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'). 제공되면, 이 프롬프트의 메시지가 이 요청의 메시지 앞에 이어서 추가됩니다. 프롬프트 메시지에 포함된 템플릿 변수는 template_vars 매개변수를 사용해 치환할 수 있습니다.
프롬프트 메시지에서 사용되는 템플릿 변수를 치환하기 위한 딕셔너리입니다. 메시지에 포함된 '{variable_name}' 형식의 변수는 이 딕셔너리에 지정된 값으로 대체됩니다. (프롬프트가 제공된 경우) 프롬프트 메시지와 일반 메시지 모두에 적용됩니다.
성공 응답