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>"
}
]
}OpenAI와 호환되는 API
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>"
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Weave Prompt 객체에 대한 참조(예: weave:///entity/project/object/prompt_name:version). 이 값을 제공하면, 해당 Prompt에서 온 메시지들이 이 요청의 메시지들 앞에 추가됩니다. Prompt 메시지에 포함된 템플릿 변수는 template_vars 매개변수를 사용해 치환할 수 있습니다.
Prompt 메시지에서 치환할 템플릿 변수들의 사전입니다. 메시지에 포함된 '{variable_name}' 형태의 변수들은 해당 키에 대응하는 값으로 대체됩니다. Prompt가 제공된 경우, Prompt 메시지와 일반 메시지 모두에 적용됩니다.
성공적인 응답