go-openai icon indicating copy to clipboard operation
go-openai copied to clipboard

How to use ASSISTANTS and Threads to get response。

Open 496672097 opened this issue 1 year ago • 2 comments

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。

image

496672097 avatar Nov 11 '23 01:11 496672097

#546 resolve this issue

raulsh avatar Nov 11 '23 07:11 raulsh

@496672097 I have answered this question in https://github.com/sashabaranov/go-openai/discussions/632 😊

ahobsonsayers avatar Jan 16 '24 18:01 ahobsonsayers