unified-ai-router 2.3.4 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
meta {
|
|
2
|
+
name: tools-2
|
|
3
|
+
type: http
|
|
4
|
+
seq: 4
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
post {
|
|
8
|
+
url: {{address}}/chat/completions
|
|
9
|
+
body: json
|
|
10
|
+
auth: none
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
headers {
|
|
14
|
+
Content-Type: application/json
|
|
15
|
+
Authorization: {{token}}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
body:json {
|
|
19
|
+
{
|
|
20
|
+
"model": "x-ai/grok-4-fast:free",
|
|
21
|
+
"messages": [
|
|
22
|
+
{
|
|
23
|
+
"role": "user",
|
|
24
|
+
"content": "What's the weather like in Tehran and Gaza today?"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"role": "assistant",
|
|
28
|
+
"content": "",
|
|
29
|
+
"tool_calls": [
|
|
30
|
+
{
|
|
31
|
+
"id": "call_31531384",
|
|
32
|
+
"function": {
|
|
33
|
+
"name": "get_weather",
|
|
34
|
+
"arguments": "{\"city\":\"Tehran\"}"
|
|
35
|
+
},
|
|
36
|
+
"index": 0,
|
|
37
|
+
"type": "function"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "call_05244223",
|
|
41
|
+
"function": {
|
|
42
|
+
"name": "get_weather",
|
|
43
|
+
"arguments": "{\"city\":\"Gaza\"}"
|
|
44
|
+
},
|
|
45
|
+
"index": 1,
|
|
46
|
+
"type": "function"
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"role": "tool",
|
|
52
|
+
"tool_call_id": "call_31531384",
|
|
53
|
+
"name": "get_weather",
|
|
54
|
+
"content": "{\"temperature\":25,\"condition\":\"sunny\",\"humidity\":40}"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"role": "tool",
|
|
58
|
+
"tool_call_id": "call_05244223",
|
|
59
|
+
"name": "get_weather",
|
|
60
|
+
"content": "{\"temperature\":28,\"condition\":\"clear\",\"humidity\":55}"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"tools": [
|
|
64
|
+
{
|
|
65
|
+
"type": "function",
|
|
66
|
+
"function": {
|
|
67
|
+
"name": "get_weather",
|
|
68
|
+
"description": "Get the current weather forecast for a given city.",
|
|
69
|
+
"parameters": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"city": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "The name of the city (e.g., Tehran) to get the weather for."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"city"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "function",
|
|
85
|
+
"function": {
|
|
86
|
+
"name": "multiply",
|
|
87
|
+
"description": "Multiply two numbers",
|
|
88
|
+
"parameters": {
|
|
89
|
+
"type": "object",
|
|
90
|
+
"properties": {
|
|
91
|
+
"a": {
|
|
92
|
+
"type": "number",
|
|
93
|
+
"description": "First number"
|
|
94
|
+
},
|
|
95
|
+
"b": {
|
|
96
|
+
"type": "number",
|
|
97
|
+
"description": "Second number"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"required": [
|
|
101
|
+
"a",
|
|
102
|
+
"b"
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"tool_choice": "auto",
|
|
109
|
+
"stream": false,
|
|
110
|
+
"temperature": 0
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
settings {
|
|
115
|
+
encodeUrl: false
|
|
116
|
+
}
|
package/bruno/openai/tools.bru
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unified-ai-router",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "A unified interface for multiple LLM providers with automatic fallback, featuring an OpenAI-compatible server, tool support, and a deployable Telegram bot.",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "mlibre",
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
<body>
|
|
13
13
|
<div class="app-shell">
|
|
14
|
+
<header class="app-header">
|
|
15
|
+
<div class="header-actions">
|
|
16
|
+
<button id="fullscreen-btn" class="icon-btn" aria-label="Toggle fullscreen">⤢</button>
|
|
17
|
+
</div>
|
|
18
|
+
</header>
|
|
14
19
|
|
|
15
20
|
<main class="chat-area">
|
|
16
21
|
<div id="messages" class="messages" role="log" aria-live="polite"></div>
|