將新文本文件添加到向量儲存
post
Create a new text document in a vector store.
Path parameters
vector-store-idstringRequired
The ID of the vector store.
Header parameters
x-api-keystringRequired
The API key for authentication.
Body
namestringOptional
The name of the document.
textstringOptional
The text content of the document.
Responses
201
Document created successfully.
application/json
post
/vector-stores/{vector-store-id}/documents/create201
Document created successfully.
示例請求
curl -X POST \
https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/create \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "產品概述",
"text": "我們的產品是一個創新的解決方案,用於管理向量嵌入。它提供與您現有系統的無縫集成,並提供強大的語義搜索功能。"
}'const addTextDocument = async (vectorStoreId, name, text) => {
const response = await fetch(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/create`, {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: name,
text: text
})
});
const data = await response.json();
console.log(data);
};
addTextDocument(
'vs_abc123',
'產品概述',
'我們的產品是一個創新的解決方案,用於管理向量嵌入。它提供與您現有系統的無縫集成,並提供強大的語義搜索功能。'
);路徑參數
參數
類型
描述
請求主體
參數
類型
描述
回應格式
認證
錯誤回應
狀態碼
描述
Last updated