GenixPRO Greetings!
Please see below response.
We're trying, without success, to programatically upload an attachment (PDF) to a thread for an Assistant created on gpt 4o. Can PDFs be uploaded as attachment? If yes, how? Can you pls. share any quickstart guide for this.
AFAIK, Files can be uploaded via Studio, or programmatically. The file_ids
parameter is required to give tools like code_interpreter
access to files. When using the File upload endpoint, you must have the purpose
set to assistants to be used with the Assistants API.
Did you consider using REST API? Also, see the similar ask and check if that helps.
If/when an attachment is uploaded (e.g. image), how do we display that in a thread? Doe we need to call some file-id using the assistant?
See this https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/assistant#retrieve-file-id
Are we first supposed to upload the file to a vector store -> get it's ID -> then ask Assistant to refer to this file in answering any related queries? If yes, pls. share any references on uploading files to vector store
The file search tool uses the vector store object. Upload your files and create a vector store to contain them. Once the vector store is created, you should poll its status until all files are out of the in_progress
state to ensure that all content has finished processing.
See Azure OpenAI Assistants file search tool (Preview) for details.
Do let me know if you have any further queries.