/vector_stores/{vector_store_id}/files
/vector_stores/{vector_store_id}/files
벡터 스토어 파일은 벡터 스토어 안에 존재하는 개별 파일을 나타냅니다.
| Feature | Supported |
| Logging | ✅ (full request/response logging) |
| Supported Providers | openai |
지원되는 연산
| Operation | Description | OpenAI Python Client | LiteLLM Proxy | | Create vector store file | Attach a file to a vector store with optional chunking overrides | ✅ | ✅ | | List vector store files | Paginated listing with filters | ✅ | ✅ | | Retrieve vector store file | Fetch metadata for a single file | ✅ | ✅ | | Delete vector store file | Remove a file from a store (file object persists) | ✅ | ✅ | | Retrieve vector store file content | Stream processed chunks | ❌ | ✅ | | Update vector store file attributes | Patch custom attributes | ❌ | ✅ |
note
벡터 스토어 지원은 현재 OpenAI 벡터 스토어와 OpenAI에서 업로드한 file ID에서만 동작합니다.
벡터 스토어 파일 생성
POST http://localhost:4000/v1/vector_stores/{vector_store_id}/files
from openai import OpenAIclient = OpenAI(
base_url="http://localhost:4000", # LiteLLM proxy or OpenAI base
api_key="sk-")vector_store_file = client.vector_stores.files.create(
vector_store_id="vs_69172088a18c8191ab3e2621aa87d1ee",
file_id="file-NDbEDJTfqVh7S4Ugi3CGYw",
chunking_strategy={
"type": "static",
"static": {
"max_chunk_size_tokens": 800,
"chunk_overlap_tokens": 400,
},
},)print(vector_store_file)
벡터 스토어 파일 목록
GET http://localhost:4000/v1/vector_stores/{vector_store_id}/files
파라미터:
vector_store_id(path, required)after/before(query, optional) – 페이지네이션 커서filter(query, optional) –in_progress,completed,failed,cancelledlimit(query, optional, 기본20, 범위1-100)order(query, optional, 기본desc)
vector_store_files = client.vector_stores.files.list(
vector_store_id="vs_abc123")print(vector_store_files)
벡터 스토어 파일 조회
GET http://localhost:4000/v1/vector_stores/{vector_store_id}/files/{file_id}
vector_store_file = client.vector_stores.files.retrieve(
vector_store_id="vs_abc123",
file_id="file-abc123")print(vector_store_file)
벡터 스토어 파일 삭제
DELETE http://localhost:4000/v1/vector_stores/{vector_store_id}/files/{file_id}
deleted_vector_store_file = client.vector_stores.files.delete(
vector_store_id="vs_abc123",
file_id="file-abc123")print(deleted_vector_store_file)
Proxy 전용 엔드포인트
원시 콘텐츠 청크나 속성 업데이트가 필요하면 LiteLLM Proxy를 직접 호출하세요.
파일 콘텐츠 조회
curl -X GET "http://localhost:4000/v1/vector_stores/\{vector_store_id\}/files/\{file_id\}/content" \
-H "Authorization: Bearer ***"
파일 속성 업데이트
curl -X POST "http://localhost:4000/v1/vector_stores/\{vector_store_id\}/files/\{file_id\}" \
-H "Authorization: Bearer ***" \
-H "Content-Type: application/json" \
-d '{
"attributes": {
"category": "support-faq",
"language": "en"
}
}'