agentic icon indicating copy to clipboard operation
agentic copied to clipboard

Fix history so the bot knows previous messages + misc cookie issue

Open publu opened this issue 2 years ago • 2 comments

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.

publu avatar Dec 06 '22 08:12 publu

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.

transitive-bullshit avatar Dec 06 '22 08:12 transitive-bullshit

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

transitive-bullshit avatar Dec 06 '22 09:12 transitive-bullshit

https://github.com/transitive-bullshit/chatgpt-api/releases/tag/v2.0.0 adds support for conversations. See the updated readme for more details.

transitive-bullshit avatar Dec 07 '22 04:12 transitive-bullshit