mirror of
https://github.com/katanemo/plano.git
synced 2026-07-02 15:51:02 +02:00
add model_server rest api
This commit is contained in:
parent
946aa90fca
commit
4ff01ab885
1 changed files with 44 additions and 0 deletions
44
api_model_server.rest
Normal file
44
api_model_server.rest
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
@model_server_endpoint = http://localhost:51000
|
||||||
|
@archfc_endpoint = https://api.fc.archgw.com
|
||||||
|
|
||||||
|
### prompt gateway request param gathering and function calling
|
||||||
|
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"}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
### prompt gateway request param gathering and function calling
|
||||||
|
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
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue