按語義相似性搜索向量儲存文件
透過語義相似性和批次操作搜尋向量儲存文件
get
Initiate a search operation with a query text and receive most semantically similar responses from the vector store.
Path parameters
vector-store-idstringRequired
The ID of the vector store.
Query parameters
qstringRequired
The search query text.
nintegerOptional
Number of chunks to return.
tnumberOptional
Matching threshold.
prev_chunksintegerOptional
Number of chunks before the matched chunk to include.
next_chunksintegerOptional
Number of chunks after the matched chunk to include.
Header parameters
x-api-keystringRequired
The API key for authentication.
Responses
200
Search results retrieved successfully.
application/json
get
/vector-stores/{vector-store-id}/documents/search200
Search results retrieved successfully.
示例請求
curl -X GET \
"https://api.rememberizer.ai/api/v1/vector-stores/vs_abc123/documents/search?q=如何%20將%20我們的%20產品%20與%20第三方%20系統%20整合&n=5&prev_chunks=1&next_chunks=1" \
-H "x-api-key: YOUR_API_KEY"const searchVectorStore = async (vectorStoreId, query, numResults = 5, prevChunks = 1, nextChunks = 1) => {
const url = new URL(`https://api.rememberizer.ai/api/v1/vector-stores/${vectorStoreId}/documents/search`);
url.searchParams.append('q', query);
url.searchParams.append('n', numResults);
url.searchParams.append('prev_chunks', prevChunks);
url.searchParams.append('next_chunks', nextChunks);
const response = await fetch(url.toString(), {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY'
}
});
const data = await response.json();
console.log(data);
};
searchVectorStore(
'vs_abc123',
'如何將我們的產品與第三方系統整合',
5,
1,
1
);路徑參數
參數
類型
描述
查詢參數
參數
類型
描述
回應格式
認證
錯誤回應
狀態碼
描述
搜尋優化技巧
上下文窗口
匹配閾值
批次操作
批次搜尋實作
批次操作的性能優化
Last updated