I have an assistant doing a pretty simple query.
The temperature is 0.01 and Top P is 1.
Code is from the sample
assistant_id = “”
assistant = openapi_client.beta.assistants.retrieve(assistant_id)
print(assistant.temperature)
print(assistant.top_p)
print(assistant.tools)
print(assistant.instructions)
event_handler = EventHandler()
thread = openapi_client.beta.threads.create( )
# add message to thread
_message = openapi_client.beta.threads.messages.create(
thread_id=thread.id, role=“user”, content=query_text
)
with openapi_client.beta.threads.runs.stream(
thread_id=thread.id,
assistant_id=assistant_id,
# instructions given on the dashboard
event_handler=event_handler,
) as stream:
stream.until_done()
# remove the prefix hash-id
In the playground, I always get the right answer. In the API, I am not getting the right answer ever.