#How to initiate multi-turn conversation with gpt-3.5-turbo?

10 messages · Page 1 of 1 (latest)

haughty plover
#

I don't see a field for sth like conversation_id in the example (https://platform.openai.com/docs/api-reference/chat):

{
  "model": "gpt-3.5-turbo",
  "messages": [{"role": "user", "content": "Hello!"}]
}

... is multi-turn conversation possible?

shut ibex
#

You have to pass the full conversation history in messages as the model has no memory of past requests.

haughty plover
# shut ibex You have to pass the full conversation history in `messages` as the model has no...

Ahh, so it should be something like:

        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Who won the world series in 2020?"},
        {"role": "assistant", "content": "The Los Angeles Dodgers won the World Series in 2020."},
        {"role": "user", "content": "Where was it played?"}

where the first one defines the system context, and the remaining ones are conversation history (me=user, chatgpt=assistant)?

lofty crater
#

ye, should be like that

shut ibex
#

Yup, thats correct

haughty plover
#

Thanks guys!

lofty crater
#

yw

slow flicker
#

To iterate on this: I'm writing a chat bot in our Slack Team for fun and with text-davinci-003 I was able to provide the names of people in the chat as context and therefor enable chats with multiple people.
The prompt would look like:


Bob: Hi bot, how are you?
You: I'm great! How about you?
Alice: Hi bot, have you met Bob?
You: 

And using this context the bot would know about Bob and Alice's individual answers.

With gpt-3.5-turbo all I can provide as context about the chat participants is "assistant" or "user". Is there any other way to differentiate between different chat participants?
I'm trying things like "Bob says: <actual content>" in the "content" field of a message but I wonder if there's a better way.

nocturne wasp
#

Hi - I am trying the multi-turn conversation. I can keep appending user prompts and chatgpt completions to a messages array and then pass that messages array back to the chatgpt completion api - and it works well. However, it seems like I will run into a limit of some kind - is that correct? and so if I wanted to give ChatGPT a whole lot of information - how would I do that? (Using model="gtp-3.5-turbo").

rare shell