exportGPUSTACK_API_KEY=your_api_key
curlhttp://your_gpustack_server_url/v1/rerank\-H"Content-Type: application/json"\-H"Authorization: Bearer $GPUSTACK_API_KEY"\-d'{ "model": "bge-reranker-v2-m3", "query": "What is a panda?", "top_n": 3, "documents": [ "hi", "it is a bear", "The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China." ] }'|jq
{"model":"bge-reranker-v2-m3","object":"list","results":[{"document":{"text":"The giant panda (Ailuropoda melanoleuca), sometimes called a panda bear or simply panda, is a bear species endemic to China."},"index":2,"relevance_score":1.951932668685913},{"document":{"text":"it is a bear"},"index":1,"relevance_score":-3.7347371578216553},{"document":{"text":"hi"},"index":0,"relevance_score":-6.157620906829834}],"usage":{"prompt_tokens":69,"total_tokens":69}}
System One 判定 API
判定モデル(decision カテゴリのデプロイ)は、テキストを生成する代わりに System One(Jev)判定契約に応答します。state と一連の questions を渡すと、補完ではなく型付きの回答を返します。GPUStack はこの契約を /v1/systemone パスで提供します。
model フィールドは必須で、/v1/chat/completions とまったく同じくモデルルート名を指定します。GPUStack はモデルを解決し、リクエスト本文の残りとレスポンス全体を判定エンジンへそのまま透過します。
exportGPUSTACK_API_KEY=your_api_key
# Assume the model route id is 42.curlhttp://your_gpustack_server_url/model/proxy/42/embed\-XPOST\-H"Content-Type: application/json"\-H"Authorization: Bearer $GPUSTACK_API_KEY"\-d'{"inputs": ["What is Deep Learning?", "Deep Learning is not..."]}'
ヘッダーによる指定(非推奨):/model/proxy/<upstream-path> に送信し、X-GPUStack-Model ヘッダーまたは JSON 本文の model フィールドで対象モデルを指定します。
curlhttp://your_gpustack_server_url/model/proxy/embed\-XPOST\-H"Content-Type: application/json"\-H"Authorization: Bearer $GPUSTACK_API_KEY"\-H"X-GPUStack-Model: bge-m3"\-d'{"inputs": ["What is Deep Learning?", "Deep Learning is not..."]}'