Skip to content

trying to use my assistant; one run creates more than one run #1727

@dehhganii

Description

@dehhganii

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

with creating a thread:
thread = client.beta.threads.create()

with creating the message:
message = client.beta.threads.messages.create( thread_id=thread.id, role="role", content="message" )

and run using this command:
run = client.beta.threads.runs.create_and_poll( thread_id=thread.id, assistant_id='assistant_id' )

Sometimes, when I see the chat in here https://platform.openai.com/threads/, one run causes multiple responses from the assistant. So, when I grab the latest message, it is not based on the initial message I sent.

I put all these three steps in one loop, of length around 100, and I saw this behavior in some of the threads.

To Reproduce

image

Code snippets

No response

OS

linux

Python version

3.10

Library version

openai v1.0.1

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions