unified-ai-router 3.2.5 → 3.2.7
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.
- package/.github/workflows/deploy.yml +57 -0
- package/docs/.vitepress/config.mjs +26 -0
- package/docs/.vitepress/dist/404.html +22 -0
- package/docs/.vitepress/dist/api-examples.html +83 -0
- package/docs/.vitepress/dist/assets/api-examples.md.DJfFzauc.js +16 -0
- package/docs/.vitepress/dist/assets/api-examples.md.DJfFzauc.lean.js +1 -0
- package/docs/.vitepress/dist/assets/app.BKyBzHbv.js +1 -0
- package/docs/.vitepress/dist/assets/chunks/framework.DLCvNBTH.js +19 -0
- package/docs/.vitepress/dist/assets/chunks/theme.h95WUA9L.js +1 -0
- package/docs/.vitepress/dist/assets/index.md.BUSJOVQn.js +1 -0
- package/docs/.vitepress/dist/assets/index.md.BUSJOVQn.lean.js +1 -0
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/docs/.vitepress/dist/assets/markdown-examples.md.Dlr0WOEb.js +33 -0
- package/docs/.vitepress/dist/assets/markdown-examples.md.Dlr0WOEb.lean.js +1 -0
- package/docs/.vitepress/dist/assets/style.CVX7x1tQ.css +1 -0
- package/docs/.vitepress/dist/hashmap.json +1 -0
- package/docs/.vitepress/dist/index.html +25 -0
- package/docs/.vitepress/dist/markdown-examples.html +57 -0
- package/docs/.vitepress/dist/vp-icons.css +1 -0
- package/docs/index.md +25 -0
- package/docs/overview.md +9 -0
- package/docs/quickstart.md +51 -0
- package/package.json +9 -3
- package/bruno/openai/bruno.json +0 -9
- package/bruno/openai/chat-long.bru +0 -38
- package/bruno/openai/chat.bru +0 -38
- package/bruno/openai/environments/local.bru +0 -3
- package/bruno/openai/environments/openrouter.bru +0 -4
- package/bruno/openai/environments/render.com.bru +0 -3
- package/bruno/openai/models.bru +0 -38
- package/bruno/openai/tools-2.bru +0 -116
- package/bruno/openai/tools.bru +0 -80
package/bruno/openai/chat.bru
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
meta {
|
|
2
|
-
name: chat
|
|
3
|
-
type: http
|
|
4
|
-
seq: 1
|
|
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
|
-
"messages": [
|
|
21
|
-
{
|
|
22
|
-
"role": "system",
|
|
23
|
-
"content": "You are a helpful assistant."
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"role": "user",
|
|
27
|
-
"content": "Hello, say 10 words only."
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"model": "test",
|
|
31
|
-
"temperature": 0,
|
|
32
|
-
"stream": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
settings {
|
|
37
|
-
encodeUrl: false
|
|
38
|
-
}
|
package/bruno/openai/models.bru
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
meta {
|
|
2
|
-
name: models
|
|
3
|
-
type: http
|
|
4
|
-
seq: 5
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
get {
|
|
8
|
-
url: {{address}}/models
|
|
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
|
-
"messages": [
|
|
21
|
-
{
|
|
22
|
-
"role": "system",
|
|
23
|
-
"content": "You are a helpful assistant."
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"role": "user",
|
|
27
|
-
"content": "Hello, say two words only."
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"model": "x-ai/grok-4-fast:free",
|
|
31
|
-
"temperature": 0,
|
|
32
|
-
"stream": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
settings {
|
|
37
|
-
encodeUrl: false
|
|
38
|
-
}
|
package/bruno/openai/tools-2.bru
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
meta {
|
|
2
|
-
name: tools
|
|
3
|
-
type: http
|
|
4
|
-
seq: 3
|
|
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
|
-
"tools": [
|
|
28
|
-
{
|
|
29
|
-
"type": "function",
|
|
30
|
-
"function": {
|
|
31
|
-
"name": "get_weather",
|
|
32
|
-
"description": "Get the current weather forecast for a given city.",
|
|
33
|
-
"parameters": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"properties": {
|
|
36
|
-
"city": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "The name of the city (e.g., Tehran) to get the weather for."
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"required": [
|
|
42
|
-
"city"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"type": "function",
|
|
49
|
-
"function": {
|
|
50
|
-
"name": "multiply",
|
|
51
|
-
"description": "Multiply two numbers",
|
|
52
|
-
"parameters": {
|
|
53
|
-
"type": "object",
|
|
54
|
-
"properties": {
|
|
55
|
-
"a": {
|
|
56
|
-
"type": "number",
|
|
57
|
-
"description": "First number"
|
|
58
|
-
},
|
|
59
|
-
"b": {
|
|
60
|
-
"type": "number",
|
|
61
|
-
"description": "Second number"
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
"required": [
|
|
65
|
-
"a",
|
|
66
|
-
"b"
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
],
|
|
72
|
-
"tool_choice": "auto",
|
|
73
|
-
"stream": false,
|
|
74
|
-
"temperature":0
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
settings {
|
|
79
|
-
encodeUrl: false
|
|
80
|
-
}
|