Closed sudoAlphaX closed 10 months ago
Is it possible to monkey-patch the official ChatGPT Python API using such a method? It will be useful if we could use the official module but with such an implementation.
I'm not sure, but the idea seems pretty good. I will look into it.
After scratching my head for a few hours, it seems pretty darn tough. Plus, I don't really see the point, so I'm gonna pass on it.
I have never used the ChatGPT API, but arent there other modules that leverage the ChatGPT API in them. If if it true, then we can use other modules too effectively for free.
Oh yeah, good point. But it's not gonna be easy to do it. I will try again.
How about we start fresh, just focusing on the chat feature? It seems simpler. We can then swap out the old API with this one in a virtual environment or something like that.
Here's the basic way to use the chat feature of the ChatGPT API:
import openai
openai.api_key = 'YOUR_API_KEY'
messages = [ {"role": "system", "content":
"You are a intelligent assistant."} ]
while True:
message = input("User : ")
if message:
messages.append(
{"role": "user", "content": message},
)
chat = openai.ChatCompletion.create(
model="gpt-3.5-turbo", messages=messages
)
reply = chat.choices[0].message.content
print(f"ChatGPT: {reply}")
messages.append({"role": "assistant", "content": reply})
How about we start fresh, just focusing on the chat feature? It seems simpler. We can then swap out the old API with this one in a virtual environment or something like that.
yea that seems good. and by the way. But are there any other features?
just focusing on the chat feature What are you referencing?
BTW, how about a new project that focuses on monkey-patching the openai api and redirecting chatgpt requests to an offline model like gpt4free I think it will be pretty interesting considering the number of models we can use instead of only ChatGPT
But are there any other features?
Things related to OpenAI, such as their other projects like DALL·E, etc.
What are you referencing?
Basically, remove everything other than the chat (ChatGPT) feature because it's not going to work anyway since they all need the API key.
BTW, how about a new project that focuses on monkey-patching the openai api and redirecting chatgpt requests to an offline model like gpt4free I think it will be pretty interesting considering the number of models we can use instead of only ChatGPT
I'm not sure. Seems a little hard, we'll think about that later.
Basically, remove everything other than the chat (ChatGPT) feature because it's not going to work anyway since they all need the API key.
oh i understand
I'm not sure. Seems a little hard, we'll think about that later.
alright. If you decide to work on it, I'll contribute too.
So, where do we start?
I think we need a fresh repo with a function that when called with a prompt and the ai engine, will return the response from chatgpt, through web prompts. it would be nice if the function was similar to the official openai chatgpt function in terms of args.
I think we need a fresh repo with a function that when called with a prompt and the ai engine, will return the response from chatgpt, through web prompts. it would be nice if the function was similar to the official openai chatgpt function in terms of args.
Yeah cool, but there's a little issue. I don't think this reverse-engineered API is working anymore. The API is returning this error:
{"error": "Our systems have detected unusual activity from your system. Please try again later."}
Can you confirm if it returns the same thing for you too?
alright, give me a minute. BTW, you can try a chatgpt proxy, it's a repo in github.
From: Zai @.> Sent: Monday, October 23, 2023 15:08 To: Zai-Kun/reverse-engineered-chatgpt @.> Cc: Alpha @.>; Author @.> Subject: Re: [Zai-Kun/reverse-engineered-chatgpt] Monkey-patching official OpenAI module (Issue #2)
I think we need a fresh repo with a function that when called with a prompt and the ai engine, will return the response from chatgpt, through web prompts. it would be nice if the function was similar to the official openai chatgpt function in terms of args.
Yeah cool, but there's a little issue. I don't think this reverse-engineered API is working anymore. The API is returning this error:
{"error": "Our systems have detected unusual activity from your system. Please try again later."}
Can you confirm if it returns the same thing for you too?
— Reply to this email directly, view it on GitHubhttps://github.com/Zai-Kun/reverse-engineered-chatgpt/issues/2#issuecomment-1774804148, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKLY6CUACSJMXE7WUA2ZM6LYAY3K7AVCNFSM6AAAAAA6K3WPUWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZUHAYDIMJUHA. You are receiving this because you authored the thread.Message ID: @.***>
you can try a chatgpt proxy, it's a repo in github.
Oh yeah, I remember something like that.
{'message': None, 'conversation_id': 'ae2ab303-ca88-456a-8382-ddf700144609', 'error': 'Our systems have detected unusual activity from your system. Please try again later.'}
Same issue here, and it's the first time i'm using the script
{'message': None, 'conversation_id': 'ae2ab303-ca88-456a-8382-ddf700144609', 'error': 'Our systems have detected unusual activity from your system. Please try again later.'}
Same issue here, and it's the first time i'm using the script
It used to work just fine before.
After looking into it more, I have found that you need to include something called an 'arkose_token' in the payload. For now, let's put 'Monkey-patching' on hold, and let's focus on making the API work again.
alright
Is it possible to monkey-patch the official ChatGPT Python API using such a method? It will be useful if we could use the official module but with such an implementation.