Calling client.beta.threads.create_and_run errors out with the following
invalid character: expected an optional prefix ofurn:uuid:followed by [0-9a-fA-F-], foundrat 1%
Same error with a direct curl
curl URL/threads/runs \
-H "Authorization: Bearer EMPTY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v1" \
-d '{
"assistant_id": "ASSISTANT_ID",
"thread": {
"messages": [
{"role": "user", "content": "Explain deep learning to a 5 year old."}
]
}
}'
To Reproduce
client = OpenAI(
api_key="EMPTY",
base_url=HAL-9100-URL,
)
# Create an assistant
neil_assistant = client.beta.assistants.create(
instructions="You are Neil Degrasse Tyson.",
name="Neil Degrasse Tyson",
tools=[],
model="mistral/mixtral-8x7b-instruct",
)
# Call create_and_run
client.beta.threads.create_and_run(assistant_id=neil_assistant.id, thread={"messages": [{"role": "user", "content": "Can you explain the concept of black holes like I'm 5?"}]})
Calling
client.beta.threads.create_and_run
errors out with the followinginvalid character: expected an optional prefix of
urn:uuid:followed by [0-9a-fA-F-], found
rat 1%
Same error with a direct curl
To Reproduce
Expected behavior Should create a thread and run it. OpenAI docs - https://platform.openai.com/docs/api-reference/runs/createThreadAndRun