mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-03 19:57:35 +00:00
366 lines
10 KiB
JSON
366 lines
10 KiB
JSON
{
|
|
"request": {
|
|
"method": "POST",
|
|
"url": "http://localhost:8000/v1/v1/chat/completions",
|
|
"headers": {},
|
|
"body": {
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"tools": [
|
|
{
|
|
"type": "function",
|
|
"function": {
|
|
"name": "get_weather",
|
|
"description": "Get the current weather",
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"location": {
|
|
"type": "string",
|
|
"description": "The city and state (both required), e.g. San Francisco, CA."
|
|
}
|
|
},
|
|
"required": [
|
|
"location"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "Pretend you are a weather assistant."
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "What's the weather like in San Francisco, CA?"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"stream": true,
|
|
"temperature": 0.0,
|
|
"max_tokens": 4096
|
|
},
|
|
"endpoint": "/v1/chat/completions",
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct"
|
|
},
|
|
"response": {
|
|
"body": [
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": "",
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": "assistant",
|
|
"tool_calls": null
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": "",
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": null
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": "chatcmpl-tool-52543da3e42a4dee83901fc943dd4797",
|
|
"function": {
|
|
"arguments": null,
|
|
"name": "get_weather"
|
|
},
|
|
"type": "function"
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": "{\"location\": \"",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": "San",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": " Francisco",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": ",",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": " CA\"}",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": null,
|
|
"index": 0,
|
|
"logprobs": null
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
},
|
|
{
|
|
"__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk",
|
|
"__data__": {
|
|
"id": "chatcmpl-99c430ba3b3b4036ba8c5c0aa9bca6d4",
|
|
"choices": [
|
|
{
|
|
"delta": {
|
|
"content": null,
|
|
"function_call": null,
|
|
"refusal": null,
|
|
"role": null,
|
|
"tool_calls": [
|
|
{
|
|
"index": 0,
|
|
"id": null,
|
|
"function": {
|
|
"arguments": "",
|
|
"name": null
|
|
},
|
|
"type": null
|
|
}
|
|
]
|
|
},
|
|
"finish_reason": "tool_calls",
|
|
"index": 0,
|
|
"logprobs": null,
|
|
"stop_reason": 128008
|
|
}
|
|
],
|
|
"created": 1758035735,
|
|
"model": "meta-llama/Llama-3.2-1B-Instruct",
|
|
"object": "chat.completion.chunk",
|
|
"service_tier": null,
|
|
"system_fingerprint": null,
|
|
"usage": null
|
|
}
|
|
}
|
|
],
|
|
"is_streaming": true
|
|
}
|
|
}
|