unitysvc-data 0.1.6__tar.gz → 0.1.7__tar.gz
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.
- {unitysvc_data-0.1.6/src/unitysvc_data.egg-info → unitysvc_data-0.1.7}/PKG-INFO +1 -1
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/pyproject.toml +1 -1
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/_manifest.json +18 -18
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/api/connectivity/connectivity-v1.sh.j2 +5 -7
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-anthropic/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-anthropic/code-example-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-anthropic/code-example-v1.py.j2 +2 -2
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-embed-javascript/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-embed-javascript/code-example-embed-v1.js → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-embed-javascript/code-example-embed-v1.js.j2 +3 -5
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-embed-requests/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-embed-requests/code-example-embed-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-embed-requests/code-example-embed-v1.py.j2 +3 -7
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-embed-shell/README.md +1 -1
- unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-embed-shell/code-example-embed-v1.sh.j2 +12 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-fc-requests/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-fc-requests/code-example-fc-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-fc-requests/code-example-fc-v1.py.j2 +3 -7
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-guard-requests/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-guard-requests/code-example-guard-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-guard-requests/code-example-guard-v1.py.j2 +3 -7
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-image-requests/README.md +1 -1
- unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-image-requests/code-example-image-v1.py.j2 +28 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-javascript/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-javascript/code-example-v1.js → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-javascript/code-example-v1.js.j2 +3 -5
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-openai/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-openai/code-example-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-openai/code-example-v1.py.j2 +2 -2
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-openai-javascript/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-openai-javascript/code-example-v1.js → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-openai-javascript/code-example-v1.js.j2 +2 -2
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-requests/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-requests/code-example-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-requests/code-example-v1.py.j2 +3 -7
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-rerank-requests/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-rerank-requests/code-example-rerank-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-rerank-requests/code-example-rerank-v1.py.j2 +3 -7
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-shell/README.md +1 -1
- unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-shell/code-example-v1.sh.j2 +15 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-streaming-openai/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-streaming-openai/code-example-v1.py → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-streaming-openai/code-example-v1.py.j2 +2 -2
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/README.md +1 -1
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/code-example-v1.js → unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/code-example-v1.js.j2 +2 -2
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-transcription-requests/README.md +1 -1
- unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-transcription-requests/code-example-transcription-v1.py.j2 +23 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-tts-requests/README.md +1 -1
- unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-tts-requests/code-example-tts-v1.py.j2 +25 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/code-example-vision-requests/README.md +1 -1
- unitysvc_data-0.1.7/src/unitysvc_data/examples/llm/code-example-vision-requests/code-example-vision-v1.py.j2 +31 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/s3/code-example/code-example-v1.py.j2 +12 -11
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/s3/connectivity/connectivity-v1.py.j2 +9 -8
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/smtp/connectivity/connectivity-v1.sh.j2 +15 -15
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/smtp/connectivity/connectivity-v2.sh.j2 +18 -18
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7/src/unitysvc_data.egg-info}/PKG-INFO +1 -1
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data.egg-info/SOURCES.txt +18 -18
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-embed-shell/code-example-embed-v1.sh +0 -16
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-image-requests/code-example-image-v1.py +0 -31
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-shell/code-example-v1.sh +0 -19
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-transcription-requests/code-example-transcription-v1.py +0 -26
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-tts-requests/code-example-tts-v1.py +0 -28
- unitysvc_data-0.1.6/src/unitysvc_data/examples/llm/code-example-vision-requests/code-example-vision-v1.py +0 -34
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/LICENSE +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/setup.cfg +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/__init__.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/_registry.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/_version.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/cli.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/api/connectivity/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/description/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/description/description-v1.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/request-template/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/llm/request-template/request-template-v1.json +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/notification/description/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/notification/description/description-v1.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/recommender/description/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/recommender/description/description-v1.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/s3/code-example/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/s3/connectivity/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/s3/description/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/s3/description/description-v1.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/smtp/connectivity/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/uptime/description/README.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/examples/uptime/description/description-v1.md +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/presets.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data/py.typed +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data.egg-info/dependency_links.txt +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data.egg-info/entry_points.txt +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data.egg-info/requires.txt +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/src/unitysvc_data.egg-info/top_level.txt +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/tests/test_build.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/tests/test_cli.py +0 -0
- {unitysvc_data-0.1.6 → unitysvc_data-0.1.7}/tests/test_presets.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "unitysvc-data"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.7"
|
|
8
8
|
description = "Standard examples and presets for UnitySVC data packages"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Bo Peng", email = "bo.peng@unitysvc.com" }]
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"llm_code_example_anthropic_v1": {
|
|
48
48
|
"category": "code_example",
|
|
49
49
|
"description": "Python example: send a message to an Anthropic-API-compatible LLM using the anthropic SDK",
|
|
50
|
-
"example_file": "llm/code-example-anthropic/code-example-v1.py",
|
|
50
|
+
"example_file": "llm/code-example-anthropic/code-example-v1.py.j2",
|
|
51
51
|
"is_active": true,
|
|
52
52
|
"is_public": true,
|
|
53
53
|
"meta": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"llm_code_example_embed_javascript_v1": {
|
|
64
64
|
"category": "code_example",
|
|
65
65
|
"description": "JavaScript example: request OpenAI-compatible embeddings via fetch",
|
|
66
|
-
"example_file": "llm/code-example-embed-javascript/code-example-embed-v1.js",
|
|
66
|
+
"example_file": "llm/code-example-embed-javascript/code-example-embed-v1.js.j2",
|
|
67
67
|
"is_active": true,
|
|
68
68
|
"is_public": true,
|
|
69
69
|
"meta": {},
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"llm_code_example_embed_requests_v1": {
|
|
76
76
|
"category": "code_example",
|
|
77
77
|
"description": "Python example: request OpenAI-compatible embeddings for a list of inputs",
|
|
78
|
-
"example_file": "llm/code-example-embed-requests/code-example-embed-v1.py",
|
|
78
|
+
"example_file": "llm/code-example-embed-requests/code-example-embed-v1.py.j2",
|
|
79
79
|
"is_active": true,
|
|
80
80
|
"is_public": true,
|
|
81
81
|
"meta": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"llm_code_example_embed_shell_v1": {
|
|
92
92
|
"category": "code_example",
|
|
93
93
|
"description": "Shell example: request OpenAI-compatible embeddings via curl",
|
|
94
|
-
"example_file": "llm/code-example-embed-shell/code-example-embed-v1.sh",
|
|
94
|
+
"example_file": "llm/code-example-embed-shell/code-example-embed-v1.sh.j2",
|
|
95
95
|
"is_active": true,
|
|
96
96
|
"is_public": true,
|
|
97
97
|
"meta": {},
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"llm_code_example_fc_requests_v1": {
|
|
104
104
|
"category": "code_example",
|
|
105
105
|
"description": "Python example: chat completion with function/tool calling on an OpenAI-compatible LLM",
|
|
106
|
-
"example_file": "llm/code-example-fc-requests/code-example-fc-v1.py",
|
|
106
|
+
"example_file": "llm/code-example-fc-requests/code-example-fc-v1.py.j2",
|
|
107
107
|
"is_active": true,
|
|
108
108
|
"is_public": true,
|
|
109
109
|
"meta": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"llm_code_example_guard_requests_v1": {
|
|
120
120
|
"category": "code_example",
|
|
121
121
|
"description": "Python example: probe a Llama-Guard-style safety classifier with a borderline prompt",
|
|
122
|
-
"example_file": "llm/code-example-guard-requests/code-example-guard-v1.py",
|
|
122
|
+
"example_file": "llm/code-example-guard-requests/code-example-guard-v1.py.j2",
|
|
123
123
|
"is_active": true,
|
|
124
124
|
"is_public": true,
|
|
125
125
|
"meta": {
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"llm_code_example_image_requests_v1": {
|
|
136
136
|
"category": "code_example",
|
|
137
137
|
"description": "Python example: generate an image from a text prompt via an OpenAI-compatible images endpoint",
|
|
138
|
-
"example_file": "llm/code-example-image-requests/code-example-image-v1.py",
|
|
138
|
+
"example_file": "llm/code-example-image-requests/code-example-image-v1.py.j2",
|
|
139
139
|
"is_active": true,
|
|
140
140
|
"is_public": true,
|
|
141
141
|
"meta": {
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"llm_code_example_javascript_v1": {
|
|
152
152
|
"category": "code_example",
|
|
153
153
|
"description": "JavaScript example: send a chat completion request to an OpenAI-compatible LLM",
|
|
154
|
-
"example_file": "llm/code-example-javascript/code-example-v1.js",
|
|
154
|
+
"example_file": "llm/code-example-javascript/code-example-v1.js.j2",
|
|
155
155
|
"is_active": true,
|
|
156
156
|
"is_public": true,
|
|
157
157
|
"meta": {},
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"llm_code_example_openai_javascript_v1": {
|
|
164
164
|
"category": "code_example",
|
|
165
165
|
"description": "JavaScript example: send a chat completion request to an OpenAI-compatible LLM using the openai SDK",
|
|
166
|
-
"example_file": "llm/code-example-openai-javascript/code-example-v1.js",
|
|
166
|
+
"example_file": "llm/code-example-openai-javascript/code-example-v1.js.j2",
|
|
167
167
|
"is_active": true,
|
|
168
168
|
"is_public": true,
|
|
169
169
|
"meta": {
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"llm_code_example_openai_v1": {
|
|
180
180
|
"category": "code_example",
|
|
181
181
|
"description": "Python example: send a chat completion request to an OpenAI-compatible LLM using the openai SDK",
|
|
182
|
-
"example_file": "llm/code-example-openai/code-example-v1.py",
|
|
182
|
+
"example_file": "llm/code-example-openai/code-example-v1.py.j2",
|
|
183
183
|
"is_active": true,
|
|
184
184
|
"is_public": true,
|
|
185
185
|
"meta": {
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"llm_code_example_requests_v1": {
|
|
196
196
|
"category": "code_example",
|
|
197
197
|
"description": "Python example: send a chat completion request to an OpenAI-compatible LLM using the requests library",
|
|
198
|
-
"example_file": "llm/code-example-requests/code-example-v1.py",
|
|
198
|
+
"example_file": "llm/code-example-requests/code-example-v1.py.j2",
|
|
199
199
|
"is_active": true,
|
|
200
200
|
"is_public": true,
|
|
201
201
|
"meta": {
|
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
"llm_code_example_rerank_requests_v1": {
|
|
212
212
|
"category": "code_example",
|
|
213
213
|
"description": "Python example: rerank a candidate document set against a query",
|
|
214
|
-
"example_file": "llm/code-example-rerank-requests/code-example-rerank-v1.py",
|
|
214
|
+
"example_file": "llm/code-example-rerank-requests/code-example-rerank-v1.py.j2",
|
|
215
215
|
"is_active": true,
|
|
216
216
|
"is_public": true,
|
|
217
217
|
"meta": {
|
|
@@ -227,7 +227,7 @@
|
|
|
227
227
|
"llm_code_example_shell_v1": {
|
|
228
228
|
"category": "code_example",
|
|
229
229
|
"description": "Shell example: send a chat completion request to an OpenAI-compatible LLM via curl",
|
|
230
|
-
"example_file": "llm/code-example-shell/code-example-v1.sh",
|
|
230
|
+
"example_file": "llm/code-example-shell/code-example-v1.sh.j2",
|
|
231
231
|
"is_active": true,
|
|
232
232
|
"is_public": true,
|
|
233
233
|
"meta": {},
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"llm_code_example_streaming_openai_javascript_v1": {
|
|
240
240
|
"category": "code_example",
|
|
241
241
|
"description": "JavaScript example: stream a chat completion from an OpenAI-compatible LLM using the openai SDK",
|
|
242
|
-
"example_file": "llm/code-example-streaming-openai-javascript/code-example-v1.js",
|
|
242
|
+
"example_file": "llm/code-example-streaming-openai-javascript/code-example-v1.js.j2",
|
|
243
243
|
"is_active": true,
|
|
244
244
|
"is_public": true,
|
|
245
245
|
"meta": {
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
"llm_code_example_streaming_openai_v1": {
|
|
256
256
|
"category": "code_example",
|
|
257
257
|
"description": "Python example: stream a chat completion from an OpenAI-compatible LLM using the openai SDK",
|
|
258
|
-
"example_file": "llm/code-example-streaming-openai/code-example-v1.py",
|
|
258
|
+
"example_file": "llm/code-example-streaming-openai/code-example-v1.py.j2",
|
|
259
259
|
"is_active": true,
|
|
260
260
|
"is_public": true,
|
|
261
261
|
"meta": {
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
"llm_code_example_transcription_requests_v1": {
|
|
272
272
|
"category": "code_example",
|
|
273
273
|
"description": "Python example: transcribe a pre-recorded audio file with an OpenAI-compatible audio transcription endpoint",
|
|
274
|
-
"example_file": "llm/code-example-transcription-requests/code-example-transcription-v1.py",
|
|
274
|
+
"example_file": "llm/code-example-transcription-requests/code-example-transcription-v1.py.j2",
|
|
275
275
|
"is_active": true,
|
|
276
276
|
"is_public": true,
|
|
277
277
|
"meta": {
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"llm_code_example_tts_requests_v1": {
|
|
288
288
|
"category": "code_example",
|
|
289
289
|
"description": "Python example: synthesize speech from text using an OpenAI-compatible audio/speech endpoint",
|
|
290
|
-
"example_file": "llm/code-example-tts-requests/code-example-tts-v1.py",
|
|
290
|
+
"example_file": "llm/code-example-tts-requests/code-example-tts-v1.py.j2",
|
|
291
291
|
"is_active": true,
|
|
292
292
|
"is_public": true,
|
|
293
293
|
"meta": {
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
"llm_code_example_vision_requests_v1": {
|
|
304
304
|
"category": "code_example",
|
|
305
305
|
"description": "Python example: ask a vision-capable LLM about a publicly-hosted image",
|
|
306
|
-
"example_file": "llm/code-example-vision-requests/code-example-vision-v1.py",
|
|
306
|
+
"example_file": "llm/code-example-vision-requests/code-example-vision-v1.py.j2",
|
|
307
307
|
"is_active": true,
|
|
308
308
|
"is_public": true,
|
|
309
309
|
"meta": {
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
# variants). Verifies the endpoint is reachable AND serves a sensible
|
|
4
4
|
# response. 404 / 5xx / DNS / timeout all count as failure.
|
|
5
5
|
#
|
|
6
|
-
# The
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
# Because the variable names are identical we don't branch on
|
|
11
|
-
# local_testing for this test — the script works in both modes.
|
|
6
|
+
# The base URL is rendered into the script at template-render time
|
|
7
|
+
# (gateway URL for ``test_gateway`` context, upstream URL for
|
|
8
|
+
# ``test_local``). The API key intentionally stays as an env-var
|
|
9
|
+
# lookup — never inline a real key into rendered output.
|
|
12
10
|
set -o pipefail
|
|
13
11
|
|
|
14
|
-
URL="
|
|
12
|
+
URL="{{ service_base_url }}"
|
|
15
13
|
|
|
16
14
|
# Split the curl invocation rather than expanding an empty array under
|
|
17
15
|
# `set -u` (bash 3.2 on macOS raises on "${arr[@]}" when arr is empty).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_anthropic"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example.py"
|
|
5
|
+
file = "code-example.py.j2"
|
|
6
6
|
description = "Python example: send a message to an Anthropic-API-compatible LLM using the anthropic SDK"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -3,12 +3,12 @@ import os
|
|
|
3
3
|
from anthropic import Anthropic
|
|
4
4
|
|
|
5
5
|
client = Anthropic(
|
|
6
|
-
base_url=
|
|
6
|
+
base_url="{{ service_base_url }}",
|
|
7
7
|
api_key=os.environ["UNITYSVC_API_KEY"],
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
response = client.messages.create(
|
|
11
|
-
model=
|
|
11
|
+
model="{{ routing_key.model }}",
|
|
12
12
|
max_tokens=1024,
|
|
13
13
|
system="You are a helpful assistant.",
|
|
14
14
|
messages=[
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_embed_javascript"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "javascript"
|
|
5
|
-
file = "code-example-embed.js"
|
|
5
|
+
file = "code-example-embed.js.j2"
|
|
6
6
|
description = "JavaScript example: request OpenAI-compatible embeddings via fetch"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const { UNITYSVC_API_KEY, SERVICE_BASE_URL, MODEL } = process.env;
|
|
2
|
-
|
|
3
1
|
async function main() {
|
|
4
|
-
const response = await fetch(
|
|
2
|
+
const response = await fetch("{{ service_base_url }}/embeddings", {
|
|
5
3
|
method: "POST",
|
|
6
4
|
headers: {
|
|
7
|
-
Authorization: `Bearer ${UNITYSVC_API_KEY}`,
|
|
5
|
+
Authorization: `Bearer ${process.env.UNITYSVC_API_KEY}`,
|
|
8
6
|
"Content-Type": "application/json",
|
|
9
7
|
},
|
|
10
8
|
body: JSON.stringify({
|
|
11
|
-
model:
|
|
9
|
+
model: "{{ routing_key.model }}",
|
|
12
10
|
input: ["Embed this sentence.", "As well as this one."],
|
|
13
11
|
}),
|
|
14
12
|
});
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_embed_requests"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example-embed.py"
|
|
5
|
+
file = "code-example-embed.py.j2"
|
|
6
6
|
description = "Python example: request OpenAI-compatible embeddings for a list of inputs"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -2,18 +2,14 @@ import os
|
|
|
2
2
|
|
|
3
3
|
import requests
|
|
4
4
|
|
|
5
|
-
UNITYSVC_API_KEY = os.environ["UNITYSVC_API_KEY"]
|
|
6
|
-
SERVICE_BASE_URL = os.environ["SERVICE_BASE_URL"]
|
|
7
|
-
MODEL = os.environ["MODEL"]
|
|
8
|
-
|
|
9
5
|
response = requests.post(
|
|
10
|
-
|
|
6
|
+
"{{ service_base_url }}/embeddings",
|
|
11
7
|
headers={
|
|
12
|
-
"Authorization": f"Bearer {UNITYSVC_API_KEY}",
|
|
8
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
13
9
|
"Content-Type": "application/json",
|
|
14
10
|
},
|
|
15
11
|
json={
|
|
16
|
-
"model":
|
|
12
|
+
"model": "{{ routing_key.model }}",
|
|
17
13
|
"input": ["Embed this sentence.", "As well as this one."],
|
|
18
14
|
},
|
|
19
15
|
)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_embed_shell"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "bash"
|
|
5
|
-
file = "code-example-embed.sh"
|
|
5
|
+
file = "code-example-embed.sh.j2"
|
|
6
6
|
description = "Shell example: request OpenAI-compatible embeddings via curl"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e -o pipefail
|
|
3
|
+
|
|
4
|
+
: "${UNITYSVC_API_KEY:?UNITYSVC_API_KEY is not set}"
|
|
5
|
+
|
|
6
|
+
curl --fail-with-body -sS "{{ service_base_url }}/embeddings" \
|
|
7
|
+
-H "Content-Type: application/json" \
|
|
8
|
+
-H "Authorization: Bearer ${UNITYSVC_API_KEY}" \
|
|
9
|
+
-d '{
|
|
10
|
+
"model": "{{ routing_key.model }}",
|
|
11
|
+
"input": ["Embed this sentence.", "As well as this one."]
|
|
12
|
+
}'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_fc_requests"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example-fc.py"
|
|
5
|
+
file = "code-example-fc.py.j2"
|
|
6
6
|
description = "Python example: chat completion with function/tool calling on an OpenAI-compatible LLM"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -3,23 +3,19 @@ import os
|
|
|
3
3
|
|
|
4
4
|
import requests
|
|
5
5
|
|
|
6
|
-
UNITYSVC_API_KEY = os.environ["UNITYSVC_API_KEY"]
|
|
7
|
-
SERVICE_BASE_URL = os.environ["SERVICE_BASE_URL"]
|
|
8
|
-
MODEL = os.environ["MODEL"]
|
|
9
|
-
|
|
10
6
|
|
|
11
7
|
def echo_message(message: str) -> str:
|
|
12
8
|
return f"Echo: {message}"
|
|
13
9
|
|
|
14
10
|
|
|
15
11
|
response = requests.post(
|
|
16
|
-
|
|
12
|
+
"{{ service_base_url }}/chat/completions",
|
|
17
13
|
headers={
|
|
18
|
-
"Authorization": f"Bearer {UNITYSVC_API_KEY}",
|
|
14
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
19
15
|
"Content-Type": "application/json",
|
|
20
16
|
},
|
|
21
17
|
json={
|
|
22
|
-
"model":
|
|
18
|
+
"model": "{{ routing_key.model }}",
|
|
23
19
|
"messages": [
|
|
24
20
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
25
21
|
{"role": "user", "content": "Echo back: this is a test"},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_guard_requests"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example-guard.py"
|
|
5
|
+
file = "code-example-guard.py.j2"
|
|
6
6
|
description = "Python example: probe a Llama-Guard-style safety classifier with a borderline prompt"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -2,18 +2,14 @@ import os
|
|
|
2
2
|
|
|
3
3
|
import requests
|
|
4
4
|
|
|
5
|
-
UNITYSVC_API_KEY = os.environ["UNITYSVC_API_KEY"]
|
|
6
|
-
SERVICE_BASE_URL = os.environ["SERVICE_BASE_URL"]
|
|
7
|
-
MODEL = os.environ["MODEL"]
|
|
8
|
-
|
|
9
5
|
response = requests.post(
|
|
10
|
-
|
|
6
|
+
"{{ service_base_url }}/chat/completions",
|
|
11
7
|
headers={
|
|
12
|
-
"Authorization": f"Bearer {UNITYSVC_API_KEY}",
|
|
8
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
13
9
|
"Content-Type": "application/json",
|
|
14
10
|
},
|
|
15
11
|
json={
|
|
16
|
-
"model":
|
|
12
|
+
"model": "{{ routing_key.model }}",
|
|
17
13
|
"messages": [
|
|
18
14
|
{
|
|
19
15
|
"role": "user",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_image_requests"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example-image.py"
|
|
5
|
+
file = "code-example-image.py.j2"
|
|
6
6
|
description = "Python example: generate an image from a text prompt via an OpenAI-compatible images endpoint"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import base64
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
import requests
|
|
5
|
+
|
|
6
|
+
prompt = os.environ.get("PROMPT", "An astronaut riding a horse on Mars")
|
|
7
|
+
output_file = os.environ.get("OUTPUT_FILE", "image.png")
|
|
8
|
+
|
|
9
|
+
response = requests.post(
|
|
10
|
+
"{{ service_base_url }}/images/generations",
|
|
11
|
+
headers={
|
|
12
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
13
|
+
"Content-Type": "application/json",
|
|
14
|
+
},
|
|
15
|
+
json={
|
|
16
|
+
"model": "{{ routing_key.model }}",
|
|
17
|
+
"prompt": prompt,
|
|
18
|
+
"n": 1,
|
|
19
|
+
"size": "1024x1024",
|
|
20
|
+
"response_format": "b64_json",
|
|
21
|
+
},
|
|
22
|
+
)
|
|
23
|
+
response.raise_for_status()
|
|
24
|
+
|
|
25
|
+
image_b64 = response.json()["data"][0]["b64_json"]
|
|
26
|
+
with open(output_file, "wb") as f:
|
|
27
|
+
f.write(base64.b64decode(image_b64))
|
|
28
|
+
print(f"Saved {output_file}")
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_javascript"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "javascript"
|
|
5
|
-
file = "code-example.js"
|
|
5
|
+
file = "code-example.js.j2"
|
|
6
6
|
description = "JavaScript example: send a chat completion request to an OpenAI-compatible LLM"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
const { UNITYSVC_API_KEY, SERVICE_BASE_URL, MODEL } = process.env;
|
|
2
|
-
|
|
3
1
|
async function main() {
|
|
4
|
-
const response = await fetch(
|
|
2
|
+
const response = await fetch("{{ service_base_url }}/chat/completions", {
|
|
5
3
|
method: "POST",
|
|
6
4
|
headers: {
|
|
7
|
-
Authorization: `Bearer ${UNITYSVC_API_KEY}`,
|
|
5
|
+
Authorization: `Bearer ${process.env.UNITYSVC_API_KEY}`,
|
|
8
6
|
"Content-Type": "application/json",
|
|
9
7
|
},
|
|
10
8
|
body: JSON.stringify({
|
|
11
|
-
model:
|
|
9
|
+
model: "{{ routing_key.model }}",
|
|
12
10
|
messages: [
|
|
13
11
|
{ role: "system", content: "You are a helpful assistant." },
|
|
14
12
|
{ role: "user", content: "Say this is a test" },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_openai"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example.py"
|
|
5
|
+
file = "code-example.py.j2"
|
|
6
6
|
description = "Python example: send a chat completion request to an OpenAI-compatible LLM using the openai SDK"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -3,12 +3,12 @@ import os
|
|
|
3
3
|
from openai import OpenAI
|
|
4
4
|
|
|
5
5
|
client = OpenAI(
|
|
6
|
-
base_url=
|
|
6
|
+
base_url="{{ service_base_url }}",
|
|
7
7
|
api_key=os.environ["UNITYSVC_API_KEY"],
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
response = client.chat.completions.create(
|
|
11
|
-
model=
|
|
11
|
+
model="{{ routing_key.model }}",
|
|
12
12
|
messages=[
|
|
13
13
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
14
14
|
{"role": "user", "content": "Say this is a test"},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_openai_javascript"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "javascript"
|
|
5
|
-
file = "code-example.js"
|
|
5
|
+
file = "code-example.js.j2"
|
|
6
6
|
description = "JavaScript example: send a chat completion request to an OpenAI-compatible LLM using the openai SDK"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const { OpenAI } = require("openai");
|
|
2
2
|
|
|
3
3
|
const client = new OpenAI({
|
|
4
|
-
baseURL:
|
|
4
|
+
baseURL: "{{ service_base_url }}",
|
|
5
5
|
apiKey: process.env.UNITYSVC_API_KEY,
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
async function main() {
|
|
9
9
|
const response = await client.chat.completions.create({
|
|
10
|
-
model:
|
|
10
|
+
model: "{{ routing_key.model }}",
|
|
11
11
|
messages: [
|
|
12
12
|
{ role: "system", content: "You are a helpful assistant." },
|
|
13
13
|
{ role: "user", content: "Say this is a test" },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_requests"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example.py"
|
|
5
|
+
file = "code-example.py.j2"
|
|
6
6
|
description = "Python example: send a chat completion request to an OpenAI-compatible LLM using the requests library"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -2,18 +2,14 @@ import os
|
|
|
2
2
|
|
|
3
3
|
import requests
|
|
4
4
|
|
|
5
|
-
UNITYSVC_API_KEY = os.environ["UNITYSVC_API_KEY"]
|
|
6
|
-
SERVICE_BASE_URL = os.environ["SERVICE_BASE_URL"]
|
|
7
|
-
MODEL = os.environ["MODEL"]
|
|
8
|
-
|
|
9
5
|
response = requests.post(
|
|
10
|
-
|
|
6
|
+
"{{ service_base_url }}/chat/completions",
|
|
11
7
|
headers={
|
|
12
|
-
"Authorization": f"Bearer {UNITYSVC_API_KEY}",
|
|
8
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
13
9
|
"Content-Type": "application/json",
|
|
14
10
|
},
|
|
15
11
|
json={
|
|
16
|
-
"model":
|
|
12
|
+
"model": "{{ routing_key.model }}",
|
|
17
13
|
"messages": [
|
|
18
14
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
19
15
|
{"role": "user", "content": "Say this is a test"},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_rerank_requests"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example-rerank.py"
|
|
5
|
+
file = "code-example-rerank.py.j2"
|
|
6
6
|
description = "Python example: rerank a candidate document set against a query"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -2,18 +2,14 @@ import os
|
|
|
2
2
|
|
|
3
3
|
import requests
|
|
4
4
|
|
|
5
|
-
UNITYSVC_API_KEY = os.environ["UNITYSVC_API_KEY"]
|
|
6
|
-
SERVICE_BASE_URL = os.environ["SERVICE_BASE_URL"]
|
|
7
|
-
MODEL = os.environ["MODEL"]
|
|
8
|
-
|
|
9
5
|
response = requests.post(
|
|
10
|
-
|
|
6
|
+
"{{ service_base_url }}/rerank",
|
|
11
7
|
headers={
|
|
12
|
-
"Authorization": f"Bearer {UNITYSVC_API_KEY}",
|
|
8
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
13
9
|
"Content-Type": "application/json",
|
|
14
10
|
},
|
|
15
11
|
json={
|
|
16
|
-
"model":
|
|
12
|
+
"model": "{{ routing_key.model }}",
|
|
17
13
|
"query": "What is the capital of the United States?",
|
|
18
14
|
"top_n": 3,
|
|
19
15
|
"documents": [
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_shell"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "bash"
|
|
5
|
-
file = "code-example.sh"
|
|
5
|
+
file = "code-example.sh.j2"
|
|
6
6
|
description = "Shell example: send a chat completion request to an OpenAI-compatible LLM via curl"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e -o pipefail
|
|
3
|
+
|
|
4
|
+
: "${UNITYSVC_API_KEY:?UNITYSVC_API_KEY is not set}"
|
|
5
|
+
|
|
6
|
+
curl --fail-with-body -sS "{{ service_base_url }}/chat/completions" \
|
|
7
|
+
-H "Content-Type: application/json" \
|
|
8
|
+
-H "Authorization: Bearer ${UNITYSVC_API_KEY}" \
|
|
9
|
+
-d '{
|
|
10
|
+
"model": "{{ routing_key.model }}",
|
|
11
|
+
"messages": [
|
|
12
|
+
{"role": "system", "content": "You are a helpful assistant."},
|
|
13
|
+
{"role": "user", "content": "Say this is a test"}
|
|
14
|
+
]
|
|
15
|
+
}'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_streaming_openai"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "python"
|
|
5
|
-
file = "code-example.py"
|
|
5
|
+
file = "code-example.py.j2"
|
|
6
6
|
description = "Python example: stream a chat completion from an OpenAI-compatible LLM using the openai SDK"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|
|
@@ -3,12 +3,12 @@ import os
|
|
|
3
3
|
from openai import OpenAI
|
|
4
4
|
|
|
5
5
|
client = OpenAI(
|
|
6
|
-
base_url=
|
|
6
|
+
base_url="{{ service_base_url }}",
|
|
7
7
|
api_key=os.environ["UNITYSVC_API_KEY"],
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
stream = client.chat.completions.create(
|
|
11
|
-
model=
|
|
11
|
+
model="{{ routing_key.model }}",
|
|
12
12
|
messages=[
|
|
13
13
|
{"role": "system", "content": "You are a helpful assistant."},
|
|
14
14
|
{"role": "user", "content": "Say this is a test"},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
preset_name = "llm_code_example_streaming_openai_javascript"
|
|
3
3
|
category = "code_example"
|
|
4
4
|
mime_type = "javascript"
|
|
5
|
-
file = "code-example.js"
|
|
5
|
+
file = "code-example.js.j2"
|
|
6
6
|
description = "JavaScript example: stream a chat completion from an OpenAI-compatible LLM using the openai SDK"
|
|
7
7
|
is_active = true
|
|
8
8
|
is_public = true
|