#i cant reallyt impliment it

1 messages · Page 1 of 1 (latest)

storm prairie
#

It's because you're using the chat completions API, not the Assistants API (which is in beta). If you don't want to use the Assistants API, then perhaps you could modify your code so that it stores responses and the user queries, appending each new one to a list, then you'd pass that list along with the latest user query to the API. I haven't tried that myself, so can't promise it will work as intended.

agile veldt
storm prairie
# agile veldt wait, what do you mean im using the chat completions API, how can i impliment th...

Check the documentation! All the python code you need is there under the "beta" section. The part that solves your problem the easier way is the thread. It worked well for me to maintain a conversation with a lot of back and forth between the end user and GPT. It also has a few nice things like the ability to upload files to the Assistant. Important to note that OAI recommends not using Assistants API for production yet (since it's in beta), however I've been using it for several months and it worked fine. I hope this helps. https://platform.openai.com/docs/api-reference/assistants

agile veldt
#

oh i found it

#

im not sure how to use it ttho

#

anyway thank you

#

@storm prairie

#

i found a simple glitch when i had that problem

#

i did it again and it didnt fix my issue, im not sure if im using the assistant api

#
Enter prompt: make a python file saying hello world

Sure, here is a simple Python script that prints "Hello, World!":
print("Hello, World!")
You can save this code in a file with a .py extension, such as hello_world.py, and run it using a Python interpreter to see the output.
Enter prompt: now make it say bye world instead
Goodbye world
#

YESS