메인 콘텐츠로 건너뛰기
POST
/
inference
/
v1
{path}
추론 POST
curl --request POST \
  --url https://api.example.com/inference/v1{path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [],
  "timeout": 123,
  "temperature": 123,
  "top_p": 123,
  "n": 123,
  "stop": "<string>",
  "max_completion_tokens": 123,
  "max_tokens": 123,
  "modalities": [
    "<unknown>"
  ],
  "presence_penalty": 123,
  "frequency_penalty": 123,
  "stream": true,
  "logit_bias": {},
  "user": "<string>",
  "response_format": {},
  "seed": 123,
  "tools": [
    "<unknown>"
  ],
  "tool_choice": "<string>",
  "logprobs": true,
  "top_logprobs": 123,
  "parallel_tool_calls": true,
  "extra_headers": {},
  "functions": [
    "<unknown>"
  ],
  "function_call": "<string>",
  "api_version": "<string>",
  "prompt": "<string>",
  "template_vars": {}
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

인증

Authorization
string
header
필수

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

경로 매개변수

path
string
필수

본문

application/json
model
string
필수
messages
any[]
timeout
temperature
number | null
top_p
number | null
n
integer | null
stop
max_completion_tokens
integer | null
max_tokens
integer | null
modalities
any[] | null
presence_penalty
number | null
frequency_penalty
number | null
stream
boolean | null
logit_bias
Logit Bias · object
user
string | null
response_format
Response Format · object
seed
integer | null
tools
any[] | null
tool_choice
logprobs
boolean | null
top_logprobs
integer | null
parallel_tool_calls
boolean | null
extra_headers
Extra Headers · object
functions
any[] | null
function_call
string | null
api_version
string | null
prompt
string | null

Weave Prompt 객체에 대한 참조(예: weave:///entity/project/object/prompt_name:version). 이 값을 제공하면, 해당 Prompt에서 온 메시지들이 이 요청의 메시지들 앞에 추가됩니다. Prompt 메시지에 포함된 템플릿 변수는 template_vars 매개변수를 사용해 치환할 수 있습니다.

template_vars
Template Vars · object

Prompt 메시지에서 치환할 템플릿 변수들의 사전입니다. 메시지에 포함된 '{variable_name}' 형태의 변수들은 해당 키에 대응하는 값으로 대체됩니다. Prompt가 제공된 경우, Prompt 메시지와 일반 메시지 모두에 적용됩니다.

응답

성공적인 응답