There is no available documentation for the Assistants V2 API

The current API Reference documentation for Assistants https://platform.openai.com/docs/api-reference/assistants is still for the V1 api. I need to know how the Messages API call has changed to allow a vector_store and files to be attached to a message in a thread. Specifically using the client.beta.threads.messages.create() function.

Perhaps check the file search documentation.

https://platform.openai.com/docs/assistants/tools/file-search

That is what I have been using. However it does not cover all the details like the API Reference documentation does. I was able to figure out my issue by trial and error just guessing based on how other things were shown in the file search documentation but it would still help to have details of the different SDK objects. Maybe they are waiting until it is more stable so they don’t have to do it more than once.

1 Like

Facing a similar issue, would appreciate if you could share your finding - I’m sure it would be helpful to others as well :slight_smile:

image

one just needs to expand properties several times…

https://platform.openai.com/docs/api-reference/messages/createMessage

Here is what I did to get a file attached to a thread using the Messages object

file = client.files.create(file=open(file_path,‘rb’),purpose=‘assistants’)
message = client.beta.threads.messages.create(thread_id=thread_id,role=“user”,content=message_str,
attachments=[{ “file_id”: file.id, “tools”: [{“type”: “file_search”}] }],
)

1 Like