Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
기본 URL만 바꿔 turbopuffer 코드와 SDK를 Conare에서 실행합니다. 지원되는 쓰기, 쿼리 호출과 제한을 설명합니다.
https://api.conare.ai/tpuf
curl https://api.conare.ai/tpuf/v2/namespaces/products/query \ -H "Authorization: Bearer $CONARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"rank_by": ["vector", "ANN", [0.1, 0.2, 0.3, 0.4]], "top_k": 10}'
import os import turbopuffer tpuf = turbopuffer.Turbopuffer( api_key=os.environ["CONARE_API_KEY"], region="gcp-us-central1", # any value: Conare ignores it base_url="https://api.conare.ai/tpuf/{region}", ) ns = tpuf.namespace("products") ns.write( upsert_rows=[{"id": 1, "vector": [0.1, 0.2, 0.3, 0.4], "title": "refunds"}], distance_metric="cosine_distance", ) result = ns.query(rank_by=("vector", "ANN", [0.1, 0.2, 0.3, 0.4]), top_k=10)
{ "billing": { "billable_logical_bytes_queried": 0, "billable_logical_bytes_returned": 0 }, "performance": { "cache_hit_ratio": 1.0, "cache_temperature": "hot", "query_execution_ms": 0, "server_total_ms": 0 }, "rows": [{ "$dist": 0.0, "id": 1 }] }
Count
cosine_distance
euclidean_squared
top_k
group_by
400
이 페이지가 도움이 되었나요?