Two different things:
- attaching a file to a vector store
- attaching a file to a message thread.
Attaching a file to a message does not automatically load it to a vector store. Either attach it to the message or load it into the vector store. Make sure your assistant has file search turned on in it’s configuration. Sending it dynamically via the message thread doesn’t tell the assistant to use the file search
}
From GPT:
message = openai.ThreadMessage.create(
thread_id=thread.id,
role=“user”,
content=“Please analyze the attached document.”,
attachments=[
{
“file_id”: file.id,
“tools”: [{“type”: “file_search”}] ]
)