-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Unreliable conversation_id #7
Comments
This is a sign of rate limiting. There was a limit of 48 requests per minute I think. It might have been reduced. |
That's why I'm confused. It never seems to stop rate limiting me and my first response always goes through fine. It just gives me "too many requests" only after I start passing a "conversation_id". I've waited over 10 minutes and I still get the same error. As soon as I take out the "conversation_id" parameter, I can generate replies without issue. |
Replicated. If you try to put a conversation_id manually, it fails. It might be that it compares the parent_id to the conversation_id on the server side. Try setting the correct parent_id as well as conversation_id |
Yeah, I'm not rate limited anymore but it seems like it forgets it's previous replies for me (i.e, I ask it to write code and to modify it's last response and it doesn't understand). I'm caching off "conversation_id" and "parent_id", then reusing both values on the next invocation of "get_chat_response". |
Does it work if you run it from the command line?
|
Yes, It does. I must be doing something very wrong in my code. I'm basically doing something like so:
Both my "saved_convo_id" and "saved_parent_id" are the same ones from the original reply, but the replies I get seem to forget I've been talking to it. |
self.parent_id = response["message"]["id"]
self.conversation_id = response["conversation_id"]
message = response["message"]["content"]["parts"][0]
return {'message':message, 'conversation_id':self.conversation_id, 'parent_id':self.parent_id} The |
I was. I'm trying a different approach now where I just cache off the entire "Chatbot" class instead. So far it seems to work better and I don't get rate limited, I need to test more though. Thanks for all the help so far! |
Hey can you show me an example? I get the same problem and I don't quite understand how you managed to solve it? |
My solution is pretty awful. Im just saing off the entire ChatBot class instance for each “user” in a dict. I then manually refresh tokens and such. |
I will do some testing with setting the parent_id and conversation_id later today |
from revChatGPT.revChatGPT import Chatbot
import json
# Get config
config = open("config.json", "r").read()
config = json.loads(config)
# Create a chatbot object
chatbot = Chatbot(config)
chatbot.refresh_session()
# Get a response
response = chatbot.get_chat_response("What is an egg?", output="text")
conversation = response['conversation_id']
parent_id = response['parent_id']
message = response['message']
print(message)
del chatbot
chatbot = Chatbot(config)
chatbot.conversation_id = conversation
chatbot.parent_id = parent_id
response = chatbot.get_chat_response("continue", output="text")
message = response['message']
print(message)
|
I was wondering if you've had luck using "conversation_id" to continue a conversation. It seems like when I first start a conversation (without passing "conversation_id") and then reusing it for future replies, I always get a response like so:
Am I using it wrong? I'm basically just caching off the "conversation_id" after I get my first response and passing it to the
ChatBot
constructor.The text was updated successfully, but these errors were encountered: