I want to upload a file when calling OpenAI Assistant, and pass the successfully uploaded file_id to the parameter. It can support the following request parameters, and can specify file_id and tools' file_search
curl
https://api.openai.com/v1/threads \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"messages": [
{
"role": "user",
"content": "Create 3 data visualizations based on the trends in this file.",
"attachments": [
{
"file_id": "file-ACq8OjcLQm2eIG0BvRM4z5qX",
"tools": [{"type": "file_search"}]
}
]
}
]
}'