创建矢量存储文件试用版
试用版
发布 https://api.openai.com/v1/vector_stores/{vector_store_id}/files
请求正文
矢量存储应使用的文件 ID。适用于以下工具file_search
可以访问文件。
返回
矢量存储文件对象。
示例请求
1
2
3
4
5
6
7
curl https://api.openai.com/v1/vector_stores/vs_abc123/files \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"file_id": "file-abc123"
}'
响应
1
2
3
4
5
6
7
8
9
{
"id": "file-abc123",
"object": "vector_store.file",
"created_at": 1699061776,
"usage_bytes": 1234,
"vector_store_id": "vs_abcd",
"status": "completed",
"last_error": null
}