go-openai
go-openai copied to clipboard
How to use ASSISTANTS and Threads to get response。
The code provided outlines the structures for the assistant and the thread. However, how should I use these two constructs to obtain the returned results? Alternatively, you can just tell me how to use the thread to get the results returned by the assistant. Many thanks.
What I understand so far: 1) I need to create an assistant (which can also be done via OpenAI's web interface). 2) While creating a thread, I need to add a message to it that includes the role and context. How do I run the thread to get the results? I would greatly appreciate guidance from any expert. Thank you very much, I am quite new to this.
Additional context mabe i need a example simple。
#546 resolve this issue
@496672097 I have answered this question in https://github.com/sashabaranov/go-openai/discussions/632 😊