벡터 저장소의 파일 내용 업데이트
patch
Update a specific document in a vector store.
Path parameters
vector-store-idstringRequired
The ID of the vector store.
document-idintegerRequired
The ID of the document.
Header parameters
x-api-keystringRequired
The API key for authentication.
Body
namestringOptional
The new name for the document.
Responses
200
Document updated successfully.
application/json
patch
/vector-stores/{vector-store-id}/documents/{document-id}/200
Document updated successfully.
예제 요청
curl -X PATCH \
https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/1234/ \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "업데이트된 제품 개요"
}'const updateDocument = async (vectorStoreId, documentId, newName) => {
const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/${documentId}/`, {
method: 'PATCH',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: newName
})
});
const data = await response.json();
console.log(data);
};
updateDocument('vs_abc123', 1234, '업데이트된 제품 개요');경로 매개변수
매개변수
유형
설명
vector-store-id
문자열
필수. 문서를 포함하는 벡터 저장소의 ID입니다.
document-id
정수
필수. 업데이트할 문서의 ID입니다.
요청 본문
매개변수
유형
설명
name
문자열
문서의 새 이름.
응답 형식
인증
이 엔드포인트는 x-api-key 헤더에 API 키를 사용하여 인증이 필요합니다.
오류 응답
상태 코드
설명
400
잘못된 요청 - 잘못된 요청 형식
401
인증되지 않음 - 잘못되었거나 누락된 API 키
404
찾을 수 없음 - 벡터 저장소 또는 문서를 찾을 수 없음
500
내부 서버 오류
이 엔드포인트는 벡터 저장소의 문서 메타데이터를 업데이트할 수 있게 해줍니다. 현재 문서의 이름만 업데이트할 수 있습니다. 이는 문서의 조직 및 검색 가능성을 향상시키는 데 유용하며, 문서를 다시 업로드할 필요가 없습니다.
Last updated