agentic
agentic copied to clipboard
Fix history so the bot knows previous messages + misc cookie issue
Been playing around with the api. Here are a couple fixes that could make it work better
- parentId should always be updated to the previous message sent by the bot
- conversation id should be populated after initial message received from bot (comes in parsedData)
its not working for me with sessionToken (kept getting unauthorized), so i modified it to use the entire cookie string and it works.
Thanks for the feedback @publu 🙏
its not working for me with sessionToken (kept getting unauthorized), so i modified it to use the entire cookie string and it works.
Can you explain a bit more what wasn't working for you? Maybe blurring out part of the string?
The session token should be approximately 2164 characters.
parentId should always be updated to the previous message sent by the bot
https://github.com/transitive-bullshit/chatgpt-api/pull/26 might fix this.
A common use case is replying to multiple users, so it's difficult to assume that the conversation ID should always be set to the last message sent, but it's definitely a good idea worth considering.
To continue the conversation about conversation support, please use #29
https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v2.0.0 adds support for conversations. See the updated readme for more details.