mirror of
https://github.com/katanemo/plano.git
synced 2026-07-11 16:12:13 +02:00
updating docs to reflect changes in 0.1.2 like tracing via signoz and… (#271)
This commit is contained in:
parent
d3c17c7abd
commit
a0d87d86c9
10 changed files with 14 additions and 6 deletions
77
e2e_tests/api_llm_gateway.rest
Normal file
77
e2e_tests/api_llm_gateway.rest
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
@llm_endpoint = http://localhost:12000
|
||||
@openai_endpoint = https://api.openai.com
|
||||
@access_key = {{$dotenv OPENAI_API_KEY}}
|
||||
|
||||
### openai request
|
||||
POST {{openai_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{access_key}}
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "hello"
|
||||
}
|
||||
],
|
||||
"model": "gpt-4o-mini",
|
||||
"stream": true
|
||||
}
|
||||
|
||||
### openai request (streaming)
|
||||
POST {{openai_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{access_key}}
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "hello"
|
||||
}
|
||||
],
|
||||
"model": "gpt-4o-mini",
|
||||
"stream": true
|
||||
}
|
||||
|
||||
|
||||
### llm gateway request
|
||||
POST {{llm_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### llm gateway request (streaming)
|
||||
POST {{llm_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "hello"
|
||||
}
|
||||
],
|
||||
"stream": true
|
||||
}
|
||||
|
||||
### llm gateway request (provider hint)
|
||||
POST {{llm_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
x-arch-llm-provider-hint: gpt-3.5-turbo-0125
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
44
e2e_tests/api_model_server.rest
Normal file
44
e2e_tests/api_model_server.rest
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
@model_server_endpoint = http://localhost:51000
|
||||
@archfc_endpoint = https://api.fc.archgw.com
|
||||
|
||||
### talk to model_server for completion
|
||||
POST {{model_server_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "how is the weather in seattle for next 10 days"
|
||||
}
|
||||
],
|
||||
"tools": [
|
||||
{
|
||||
"id": "weather-112",
|
||||
"tool_type": "function",
|
||||
"function": {
|
||||
"name": "weather_forecast",
|
||||
"arguments": {"city": "str", "days": "int"}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
### talk to arch_fc directly for completion
|
||||
POST {{archfc_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"model": "Arch-Function",
|
||||
"messages": [
|
||||
{
|
||||
"role": "system",
|
||||
"content": "You are a helpful assistant.\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{\"id\": \"weather-112\", \"tool_type\": \"function\", \"function\": {\"name\": \"weather_forecast\", \"arguments\": {\"city\": \"str\", \"days\": \"int\"}}}\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call>"
|
||||
},
|
||||
{ "role": "user", "content": "how is the weather in seattle?" },
|
||||
{ "role": "assistant", "content": "Of course! " }
|
||||
],
|
||||
"continue_final_message": true,
|
||||
"add_generation_prompt": false
|
||||
}
|
||||
101
e2e_tests/api_prompt_gateway.rest
Normal file
101
e2e_tests/api_prompt_gateway.rest
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
@prompt_endpoint = http://localhost:10000
|
||||
|
||||
### prompt gateway request
|
||||
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "how is the weather in seattle for next 10 days"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### prompt gateway request default target
|
||||
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "hello"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
### prompt gateway request (streaming)
|
||||
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "how is the weather in seattle for next 10 days"
|
||||
}
|
||||
],
|
||||
"stream": true
|
||||
}
|
||||
|
||||
|
||||
### prompt gateway request param gathering
|
||||
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "how is the weather in seattle"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### prompt gateway request param gathering and function calling
|
||||
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "how is the weather in seattle"
|
||||
},
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": "It seems I'm missing some information. Could you provide the following details days ?",
|
||||
"model": "Arch-Function-1.5b"
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "for next 10 days"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
### prompt gateway request param gathering and function calling (streaming)
|
||||
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": "how is the weather in seattle"
|
||||
},
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": "It seems I'm missing some information. Could you provide the following details days ?",
|
||||
"model": "Arch-Function-1.5b"
|
||||
},
|
||||
{
|
||||
"role": "user",
|
||||
"content": "for next 10 days"
|
||||
}
|
||||
],
|
||||
"stream": true
|
||||
}
|
||||
31
e2e_tests/tracing.rest
Normal file
31
e2e_tests/tracing.rest
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
POST http://localhost:4318/v1/traces
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"resourceSpans": [
|
||||
{
|
||||
"resource": {
|
||||
"attributes": [
|
||||
{ "key": "service.name", "value": { "stringValue": "upstream-llm" } }
|
||||
]
|
||||
},
|
||||
"scopeSpans": [
|
||||
{
|
||||
"scope": { "name": "default", "version": "1.0", "attributes": [] },
|
||||
"spans": [
|
||||
{
|
||||
"traceId": "fa8f7c410c28092faafbd7d4a2f5e742",
|
||||
"spanId": "4dc43055a07410d6",
|
||||
"parentSpanId": "f0acd74216a5e179",
|
||||
"name": "archgw",
|
||||
"startTimeUnixNano": "1731363782228270000",
|
||||
"endTimeUnixNano": "1731363787843156000",
|
||||
"kind": 1,
|
||||
"attributes": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue