Repository navigation
Converse in one chat #1464
|
Is there a way to have the API converse in one chat instead of creating a new one each request? It gets annoying since it keeps creating new chats and prohibits context. |
Replies: 1 comment 1 reply
|
Yup, just select an existing conversation on chat.openai.com in your browser that you've already asked at least one question and it should show the conversation_id in the URL itself. Just copy that conversation ID (everyone after /c/) and input it into the Chatbot config through the config file or when you create the object using the conversation_id field and it will append to that conversation moving forward. You can even switch between models within a single conversation. chatbot = Chatbot(config={ Hope this helps 👍 |
Yup, just select an existing conversation on chat.openai.com in your browser that you've already asked at least one question and it should show the conversation_id in the URL itself. Just copy that conversation ID (everyone after /c/) and input it into the Chatbot config through the config file or when you create the object using the conversation_id field and it will append to that conversation moving forward. You can even switch between models within a single conversation.
chatbot = Chatbot(config={
#"session_token": session_token,
"access_token": access_token,
"paid": True,
"model": "gpt-3.5-turbo",
"conversation_id": conversation_id,
"moderation": False
})
Hope this helps 👍