mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
117 lines
3.2 KiB
JSON
117 lines
3.2 KiB
JSON
{
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "http://0.0.0.0:11434/v1/v1/chat/completions",
|
|
"headers": {},
|
|
"body": {
|
|
"model": "llama3.2:3b-instruct-fp16",
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": "Book a flight from SFO to JFK for John Doe"
|
|
}
|
|
],
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "book_flight",
|
|
"description": "Book a flight",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"flight": {
|
|
"$ref": "#/$defs/FlightInfo"
|
|
},
|
|
"passenger": {
|
|
"$ref": "#/$defs/Passenger"
|
|
}
|
|
},
|
|
"required": [
|
|
"flight",
|
|
"passenger"
|
|
],
|
|
"$defs": {
|
|
"FlightInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string",
|
|
"format": "date"
|
|
}
|
|
}
|
|
},
|
|
"Passenger": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"age": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"endpoint": "/v1/chat/completions",
|
|
"model": "llama3.2:3b-instruct-fp16"
|
|
},
|
|
"response": {
|
|
"body": {
|
|
"__type__": "openai.types.chat.chat_completion.ChatCompletion",
|
|
"__data__": {
|
|
"id": "chatcmpl-185",
|
|
"choices": [
|
|
{
|
|
"finish_reason": "tool_calls",
|
|
"index": 0,
|
|
"logprobs": null,
|
|
"message": {
|
|
"content": "",
|
|
"refusal": null,
|
|
"role": "assistant",
|
|
"annotations": null,
|
|
"audio": null,
|
|
"function_call": null,
|
|
"tool_calls": [
|
|
{
|
|
"id": "call_re3m95b3",
|
|
"function": {
|
|
"arguments": "{\"flight\":\"{\\\"date\\\": \\\"2024-03-16\\\", \\\"from\\\": \\\"SFO\\\", \\\"to\\\": \\\"JFK\\\"}\",\"passenger\":\"{\\\"age\\\": 40, \\\"name\\\": \\\"John Doe\\\"}\"}",
|
|
"name": "book_flight"
|
|
},
|
|
"type": "function",
|
|
"index": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"created": 1759376621,
|
|
"model": "llama3.2:3b-instruct-fp16",
|
|
"object": "chat.completion",
|
|
"service_tier": null,
|
|
"system_fingerprint": "fp_ollama",
|
|
"usage": {
|
|
"completion_tokens": 59,
|
|
"prompt_tokens": 227,
|
|
"total_tokens": 286,
|
|
"completion_tokens_details": null,
|
|
"prompt_tokens_details": null
|
|
}
|
|
}
|
|
},
|
|
"is_streaming": false
|
|
}
|
|
}
|