#How to implement dialog context when using GPT-3.5's API?
11 messages · Page 1 of 1 (latest)
start the conversation with the role "system" and add into content the context
This content can be changed halfway through the conversation
Yes,u r right.This will consume a lot of tokens, is there any other way?
The only other way is by using embeddings.
Also, bas is wrong. You don't use system. You set it up with the proper roles user or assistant as a chat.
System message is for instructions.
Yes, I use the "assistant" role, and return the latest answer of the current session, plus a new question, so that it can "remember" the latest context.How are embeddings implemented? I searched for a similar method, which is to "feed" the latest content to ChatGPT? How to use it? API for calling embeddings?
Review the documentation on embeddings but embeddings is mostly used for extensive contextual necessities, like if you're feeding dozens of pages of stuff
Regrettably either way you're going to have to use more tokens.
Oh, I see, this should be a special assistant for training, such as talking about professional classics or knowledge base training ChatGPT. It seems that this is not suitable for the chat mode with a relatively large degree of freedom, am I right?
Pretty much. You're better off just feeding prior messages normally.