So I asked ChatGPT this but couldn't get a clear answer. When asking ChatGPT a question, you can include references previous messages in that particular conversation. I think of the conversation kind of like a 'session'. Is there a way to create a session with davinci such that it maintains a context of the ongoing conversation, and you can reference your previous messages? ChatGPT told me I could send the conversation history in the prompt, but that doesn't seem practical, since the requests will get more expensive with each question.
#Persistent context for davinci-003 conversations?
29 messages · Page 1 of 1 (latest)
u included the "memory"/"history" in the prompt when making the API call
thats the only way to keep memory
my davinci model has context, i recently implemented a great method, its still costly though
one trick is to summarize your chat history
An API for accessing new AI models developed by OpenAI
Pardon? Do you mean if you add the text "memory"/"history" to the prompt then the gpt model considers past informations?
good joke, it doesn't work, unfortunately
What they mean is that one needs to include the previous information. It doesn't have any memory.
Yes, can confirm, that's what you have to do. Even the ChatGPT implementation I can guarantee you their backend is doing the same thing. Its just due to the way the ML model works.
i worded it poorly but yeah Ronald explained what i was trying to say
there is no true memory you are responsible for keeping track of the conversation and sending all previous context with the new question when making the API call
it creates a illusion that it has past memory.
we have two problems there: the conversation has a limit of 4000 tokens (when davinci) and the cost gets too high as the conversation gets longer. There should be a way to maintain this context without having to send it every request.
to save tokens u summarize the previous conversation after x length witch you would need to calculate and figure yourself on what would make the most sense
but i agree with the would be nice to have a way of maintain the context without sending but that just means openAI handles and they would need to offset the cost to us like charging extra for context/session saving
My backend splits requests texts between contexts and an question array, which when it reaches 3800 tokens it removes the first question and inserts the lasts, and going on
But is an good idea to, when it reaches an soft cap (like 1500 tokens) to ask to the API create an summary with important topics and store it in the conversation context
Yea but these costs for context saving could be a lot more affordable
yep on my other project i have it make a ghost call after it reaches a certain amount of text and summarize it the annoying part here is that now i have keep two logs for each convo
- for the real log for people to read
2.the summarized log for saving token
i doubt it
if they offer it they would also consider how much they are losing per request over time and offset it in the cost for saving our context
What the ChatGPT api will change instead using the actual text completions api?
in the end the people that constantly hit 4k tokens will be worth it
but for the average user would still be more expensive then saving it themself
most likely just the endpoint URL
this is me just dreaming but i hope they offer something like
if u purchase ChatGPT PRO u get to save X session/context for free with the API
“500 tokens for free in every request” could be amazing
But better than it an “conversation_id” could be SO FAR awesome
Isnt fine tuning something like what this guy means?
You just start an conversation with the context and send text/responses per request
I don’t think so since fine tuning is an static information which responses an exact or similar response for what it learned
I am not sure about this. I tried to pass chatgpt table data and a lot of rules and asked to perform searches acc. to the rules. We had afterwards a lot of talk in this session. Maybe it can differ and repeatedly read the data and rules text but it didn't forget that.
GPT is many things. A law abiding citizen is not one of them. It follows its own rules