How can I connect previous threads when creating a new thread in OpenAI’s API using C#? My goal is to append the last few messages from the previous thread to the new one to maintain conversation history. I’m storing user inputs and responses in Cosmos DB and fetching the latest four messages whenever a new thread is created. Each new user input generates a new thread, and I need to ensure that the previous context is carried over by adding those last four messages to the newly created thread. What is the best way to manage this process efficiently in C# while handling multiple threads and keeping the conversation flow intact?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
How to Add Chat History in OpenAI Assistant in a C# Bot Framework? | 1 | 234 | September 9, 2024 | |
Issue with Retaining Context Using threadId in OpenAI API (C#) | 0 | 31 | December 9, 2024 | |
Adding new messages to assistant threads | 3 | 466 | October 11, 2024 | |
Keeping up the conversation using assistants API | 1 | 44 | January 10, 2025 | |
How to reuse previously created thread data in new thread without adding previous thread data to new thread | 0 | 546 | April 19, 2024 |