unitysvc-data 0.1.7__tar.gz → 0.1.8__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.7/src/unitysvc_data.egg-info → unitysvc_data-0.1.8}/PKG-INFO +1 -1
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/pyproject.toml +1 -1
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/_manifest.json +328 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/api/connectivity/README.md +5 -7
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-anthropic/README.md +9 -5
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-javascript/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-javascript/code-example-embed-image-v1.js.j2 +36 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-requests/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-requests/code-example-embed-image-v1.py.j2 +38 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-shell/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-shell/code-example-embed-image-v1.sh.j2 +21 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-embed-javascript/README.md +9 -8
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-embed-requests/README.md +9 -10
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-embed-shell/README.md +9 -8
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-fc-requests/README.md +9 -8
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-guard-javascript/README.md +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-guard-javascript/code-example-guard-v1.js.j2 +29 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-guard-requests/README.md +9 -8
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-guard-shell/README.md +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-guard-shell/code-example-guard-v1.sh.j2 +14 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-image-javascript/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-image-javascript/code-example-image-v1.js.j2 +33 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-image-requests/README.md +7 -8
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-image-shell/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-image-shell/code-example-image-v1.sh.j2 +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-imagetoimage-javascript/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-imagetoimage-javascript/code-example-imagetoimage-v1.js.j2 +38 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-imagetoimage-requests/README.md +34 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-imagetoimage-requests/code-example-imagetoimage-v1.py.j2 +26 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-imagetoimage-shell/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-imagetoimage-shell/code-example-imagetoimage-v1.sh.j2 +21 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-javascript/README.md +9 -8
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-openai/README.md +10 -9
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-openai-javascript/README.md +9 -5
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-requests/README.md +10 -11
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-rerank-javascript/README.md +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-rerank-javascript/code-example-rerank-v1.js.j2 +30 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-rerank-requests/README.md +9 -8
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-rerank-shell/README.md +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-rerank-shell/code-example-rerank-v1.sh.j2 +20 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-sentencetransformers-javascript/README.md +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-sentencetransformers-javascript/code-example-sentencetransformers-v1.js.j2 +31 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-sentencetransformers-requests/README.md +29 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-sentencetransformers-requests/code-example-sentencetransformers-v1.py.j2 +23 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-sentencetransformers-shell/README.md +28 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-sentencetransformers-shell/code-example-sentencetransformers-v1.sh.j2 +18 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-shell/README.md +9 -8
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-streaming-openai/README.md +9 -4
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/README.md +9 -4
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-transcription-javascript/README.md +34 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-transcription-javascript/code-example-transcription-v1.js.j2 +35 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-transcription-requests/README.md +7 -4
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-transcription-shell/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-transcription-shell/code-example-transcription-v1.sh.j2 +13 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-tts-javascript/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-tts-javascript/code-example-tts-v1.js.j2 +31 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-tts-requests/README.md +7 -8
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-tts-shell/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-tts-shell/code-example-tts-v1.sh.j2 +20 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-ttv-javascript/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-ttv-javascript/code-example-ttv-v1.js.j2 +30 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-ttv-requests/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-ttv-requests/code-example-ttv-v1.py.j2 +19 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-ttv-shell/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-ttv-shell/code-example-ttv-v1.sh.j2 +15 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-vision-javascript/README.md +33 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-vision-javascript/code-example-vision-v1.js.j2 +36 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-vision-requests/README.md +7 -4
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-vision-shell/README.md +32 -0
- unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-vision-shell/code-example-vision-v1.sh.j2 +23 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/s3/code-example/README.md +1 -1
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/s3/connectivity/README.md +1 -1
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8/src/unitysvc_data.egg-info}/PKG-INFO +1 -1
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data.egg-info/SOURCES.txt +48 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/LICENSE +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/setup.cfg +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/__init__.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/_registry.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/_version.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/cli.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/api/connectivity/connectivity-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-anthropic/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-embed-javascript/code-example-embed-v1.js.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-embed-requests/code-example-embed-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-embed-shell/code-example-embed-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-fc-requests/code-example-fc-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-guard-requests/code-example-guard-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-image-requests/code-example-image-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-javascript/code-example-v1.js.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-openai/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-openai-javascript/code-example-v1.js.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-requests/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-rerank-requests/code-example-rerank-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-shell/code-example-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-streaming-openai/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-streaming-openai-javascript/code-example-v1.js.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-transcription-requests/code-example-transcription-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-tts-requests/code-example-tts-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/code-example-vision-requests/code-example-vision-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/description/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/description/description-v1.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/request-template/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/llm/request-template/request-template-v1.json +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/notification/description/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/notification/description/description-v1.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/recommender/description/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/recommender/description/description-v1.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/s3/code-example/code-example-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/s3/connectivity/connectivity-v1.py.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/s3/description/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/s3/description/description-v1.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/smtp/connectivity/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/smtp/connectivity/connectivity-v1.sh.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/smtp/connectivity/connectivity-v2.sh.j2 +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/uptime/description/README.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/uptime/description/description-v1.md +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/presets.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/py.typed +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data.egg-info/dependency_links.txt +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data.egg-info/entry_points.txt +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data.egg-info/requires.txt +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data.egg-info/top_level.txt +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/tests/test_build.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/tests/test_cli.py +0 -0
- {unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/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.8"
|
|
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" }]
|
|
@@ -2,23 +2,47 @@
|
|
|
2
2
|
"aliases": {
|
|
3
3
|
"api_connectivity": "api_connectivity_v1",
|
|
4
4
|
"llm_code_example_anthropic": "llm_code_example_anthropic_v1",
|
|
5
|
+
"llm_code_example_embed_image_javascript": "llm_code_example_embed_image_javascript_v1",
|
|
6
|
+
"llm_code_example_embed_image_requests": "llm_code_example_embed_image_requests_v1",
|
|
7
|
+
"llm_code_example_embed_image_shell": "llm_code_example_embed_image_shell_v1",
|
|
5
8
|
"llm_code_example_embed_javascript": "llm_code_example_embed_javascript_v1",
|
|
6
9
|
"llm_code_example_embed_requests": "llm_code_example_embed_requests_v1",
|
|
7
10
|
"llm_code_example_embed_shell": "llm_code_example_embed_shell_v1",
|
|
8
11
|
"llm_code_example_fc_requests": "llm_code_example_fc_requests_v1",
|
|
12
|
+
"llm_code_example_guard_javascript": "llm_code_example_guard_javascript_v1",
|
|
9
13
|
"llm_code_example_guard_requests": "llm_code_example_guard_requests_v1",
|
|
14
|
+
"llm_code_example_guard_shell": "llm_code_example_guard_shell_v1",
|
|
15
|
+
"llm_code_example_image_javascript": "llm_code_example_image_javascript_v1",
|
|
10
16
|
"llm_code_example_image_requests": "llm_code_example_image_requests_v1",
|
|
17
|
+
"llm_code_example_image_shell": "llm_code_example_image_shell_v1",
|
|
18
|
+
"llm_code_example_imagetoimage_javascript": "llm_code_example_imagetoimage_javascript_v1",
|
|
19
|
+
"llm_code_example_imagetoimage_requests": "llm_code_example_imagetoimage_requests_v1",
|
|
20
|
+
"llm_code_example_imagetoimage_shell": "llm_code_example_imagetoimage_shell_v1",
|
|
11
21
|
"llm_code_example_javascript": "llm_code_example_javascript_v1",
|
|
12
22
|
"llm_code_example_openai": "llm_code_example_openai_v1",
|
|
13
23
|
"llm_code_example_openai_javascript": "llm_code_example_openai_javascript_v1",
|
|
14
24
|
"llm_code_example_requests": "llm_code_example_requests_v1",
|
|
25
|
+
"llm_code_example_rerank_javascript": "llm_code_example_rerank_javascript_v1",
|
|
15
26
|
"llm_code_example_rerank_requests": "llm_code_example_rerank_requests_v1",
|
|
27
|
+
"llm_code_example_rerank_shell": "llm_code_example_rerank_shell_v1",
|
|
28
|
+
"llm_code_example_sentencetransformers_javascript": "llm_code_example_sentencetransformers_javascript_v1",
|
|
29
|
+
"llm_code_example_sentencetransformers_requests": "llm_code_example_sentencetransformers_requests_v1",
|
|
30
|
+
"llm_code_example_sentencetransformers_shell": "llm_code_example_sentencetransformers_shell_v1",
|
|
16
31
|
"llm_code_example_shell": "llm_code_example_shell_v1",
|
|
17
32
|
"llm_code_example_streaming_openai": "llm_code_example_streaming_openai_v1",
|
|
18
33
|
"llm_code_example_streaming_openai_javascript": "llm_code_example_streaming_openai_javascript_v1",
|
|
34
|
+
"llm_code_example_transcription_javascript": "llm_code_example_transcription_javascript_v1",
|
|
19
35
|
"llm_code_example_transcription_requests": "llm_code_example_transcription_requests_v1",
|
|
36
|
+
"llm_code_example_transcription_shell": "llm_code_example_transcription_shell_v1",
|
|
37
|
+
"llm_code_example_tts_javascript": "llm_code_example_tts_javascript_v1",
|
|
20
38
|
"llm_code_example_tts_requests": "llm_code_example_tts_requests_v1",
|
|
39
|
+
"llm_code_example_tts_shell": "llm_code_example_tts_shell_v1",
|
|
40
|
+
"llm_code_example_ttv_javascript": "llm_code_example_ttv_javascript_v1",
|
|
41
|
+
"llm_code_example_ttv_requests": "llm_code_example_ttv_requests_v1",
|
|
42
|
+
"llm_code_example_ttv_shell": "llm_code_example_ttv_shell_v1",
|
|
43
|
+
"llm_code_example_vision_javascript": "llm_code_example_vision_javascript_v1",
|
|
21
44
|
"llm_code_example_vision_requests": "llm_code_example_vision_requests_v1",
|
|
45
|
+
"llm_code_example_vision_shell": "llm_code_example_vision_shell_v1",
|
|
22
46
|
"llm_description": "llm_description_v1",
|
|
23
47
|
"llm_request_template": "llm_request_template_v1",
|
|
24
48
|
"notification_description": "notification_description_v1",
|
|
@@ -60,6 +84,46 @@
|
|
|
60
84
|
"source_readme": "llm/code-example-anthropic/README.md",
|
|
61
85
|
"version": 1
|
|
62
86
|
},
|
|
87
|
+
"llm_code_example_embed_image_javascript_v1": {
|
|
88
|
+
"category": "code_example",
|
|
89
|
+
"description": "JavaScript example: embed an image via /embed (Cohere v2-style)",
|
|
90
|
+
"example_file": "llm/code-example-embed-image-javascript/code-example-embed-image-v1.js.j2",
|
|
91
|
+
"is_active": true,
|
|
92
|
+
"is_public": true,
|
|
93
|
+
"meta": {},
|
|
94
|
+
"mime_type": "javascript",
|
|
95
|
+
"preset_name": "llm_code_example_embed_image_javascript",
|
|
96
|
+
"source_readme": "llm/code-example-embed-image-javascript/README.md",
|
|
97
|
+
"version": 1
|
|
98
|
+
},
|
|
99
|
+
"llm_code_example_embed_image_requests_v1": {
|
|
100
|
+
"category": "code_example",
|
|
101
|
+
"description": "Python example: embed an image via /embed (Cohere v2-style)",
|
|
102
|
+
"example_file": "llm/code-example-embed-image-requests/code-example-embed-image-v1.py.j2",
|
|
103
|
+
"is_active": true,
|
|
104
|
+
"is_public": true,
|
|
105
|
+
"meta": {
|
|
106
|
+
"requirements": [
|
|
107
|
+
"requests"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"mime_type": "python",
|
|
111
|
+
"preset_name": "llm_code_example_embed_image_requests",
|
|
112
|
+
"source_readme": "llm/code-example-embed-image-requests/README.md",
|
|
113
|
+
"version": 1
|
|
114
|
+
},
|
|
115
|
+
"llm_code_example_embed_image_shell_v1": {
|
|
116
|
+
"category": "code_example",
|
|
117
|
+
"description": "Bash example: embed an image via /embed (Cohere v2-style) using curl",
|
|
118
|
+
"example_file": "llm/code-example-embed-image-shell/code-example-embed-image-v1.sh.j2",
|
|
119
|
+
"is_active": true,
|
|
120
|
+
"is_public": true,
|
|
121
|
+
"meta": {},
|
|
122
|
+
"mime_type": "bash",
|
|
123
|
+
"preset_name": "llm_code_example_embed_image_shell",
|
|
124
|
+
"source_readme": "llm/code-example-embed-image-shell/README.md",
|
|
125
|
+
"version": 1
|
|
126
|
+
},
|
|
63
127
|
"llm_code_example_embed_javascript_v1": {
|
|
64
128
|
"category": "code_example",
|
|
65
129
|
"description": "JavaScript example: request OpenAI-compatible embeddings via fetch",
|
|
@@ -116,6 +180,18 @@
|
|
|
116
180
|
"source_readme": "llm/code-example-fc-requests/README.md",
|
|
117
181
|
"version": 1
|
|
118
182
|
},
|
|
183
|
+
"llm_code_example_guard_javascript_v1": {
|
|
184
|
+
"category": "code_example",
|
|
185
|
+
"description": "JavaScript example: send an unsafe prompt to a guard/safety model via /chat/completions",
|
|
186
|
+
"example_file": "llm/code-example-guard-javascript/code-example-guard-v1.js.j2",
|
|
187
|
+
"is_active": true,
|
|
188
|
+
"is_public": true,
|
|
189
|
+
"meta": {},
|
|
190
|
+
"mime_type": "javascript",
|
|
191
|
+
"preset_name": "llm_code_example_guard_javascript",
|
|
192
|
+
"source_readme": "llm/code-example-guard-javascript/README.md",
|
|
193
|
+
"version": 1
|
|
194
|
+
},
|
|
119
195
|
"llm_code_example_guard_requests_v1": {
|
|
120
196
|
"category": "code_example",
|
|
121
197
|
"description": "Python example: probe a Llama-Guard-style safety classifier with a borderline prompt",
|
|
@@ -132,6 +208,30 @@
|
|
|
132
208
|
"source_readme": "llm/code-example-guard-requests/README.md",
|
|
133
209
|
"version": 1
|
|
134
210
|
},
|
|
211
|
+
"llm_code_example_guard_shell_v1": {
|
|
212
|
+
"category": "code_example",
|
|
213
|
+
"description": "Bash example: send an unsafe prompt to a guard/safety model via curl",
|
|
214
|
+
"example_file": "llm/code-example-guard-shell/code-example-guard-v1.sh.j2",
|
|
215
|
+
"is_active": true,
|
|
216
|
+
"is_public": true,
|
|
217
|
+
"meta": {},
|
|
218
|
+
"mime_type": "bash",
|
|
219
|
+
"preset_name": "llm_code_example_guard_shell",
|
|
220
|
+
"source_readme": "llm/code-example-guard-shell/README.md",
|
|
221
|
+
"version": 1
|
|
222
|
+
},
|
|
223
|
+
"llm_code_example_image_javascript_v1": {
|
|
224
|
+
"category": "code_example",
|
|
225
|
+
"description": "JavaScript example: generate an image via OpenAI-compatible /images/generations",
|
|
226
|
+
"example_file": "llm/code-example-image-javascript/code-example-image-v1.js.j2",
|
|
227
|
+
"is_active": true,
|
|
228
|
+
"is_public": true,
|
|
229
|
+
"meta": {},
|
|
230
|
+
"mime_type": "javascript",
|
|
231
|
+
"preset_name": "llm_code_example_image_javascript",
|
|
232
|
+
"source_readme": "llm/code-example-image-javascript/README.md",
|
|
233
|
+
"version": 1
|
|
234
|
+
},
|
|
135
235
|
"llm_code_example_image_requests_v1": {
|
|
136
236
|
"category": "code_example",
|
|
137
237
|
"description": "Python example: generate an image from a text prompt via an OpenAI-compatible images endpoint",
|
|
@@ -148,6 +248,58 @@
|
|
|
148
248
|
"source_readme": "llm/code-example-image-requests/README.md",
|
|
149
249
|
"version": 1
|
|
150
250
|
},
|
|
251
|
+
"llm_code_example_image_shell_v1": {
|
|
252
|
+
"category": "code_example",
|
|
253
|
+
"description": "Bash example: generate an image via OpenAI-compatible /images/generations using curl",
|
|
254
|
+
"example_file": "llm/code-example-image-shell/code-example-image-v1.sh.j2",
|
|
255
|
+
"is_active": true,
|
|
256
|
+
"is_public": true,
|
|
257
|
+
"meta": {},
|
|
258
|
+
"mime_type": "bash",
|
|
259
|
+
"preset_name": "llm_code_example_image_shell",
|
|
260
|
+
"source_readme": "llm/code-example-image-shell/README.md",
|
|
261
|
+
"version": 1
|
|
262
|
+
},
|
|
263
|
+
"llm_code_example_imagetoimage_javascript_v1": {
|
|
264
|
+
"category": "code_example",
|
|
265
|
+
"description": "JavaScript example: image-to-image transform via Hugging Face /models/<model>",
|
|
266
|
+
"example_file": "llm/code-example-imagetoimage-javascript/code-example-imagetoimage-v1.js.j2",
|
|
267
|
+
"is_active": true,
|
|
268
|
+
"is_public": true,
|
|
269
|
+
"meta": {},
|
|
270
|
+
"mime_type": "javascript",
|
|
271
|
+
"preset_name": "llm_code_example_imagetoimage_javascript",
|
|
272
|
+
"source_readme": "llm/code-example-imagetoimage-javascript/README.md",
|
|
273
|
+
"version": 1
|
|
274
|
+
},
|
|
275
|
+
"llm_code_example_imagetoimage_requests_v1": {
|
|
276
|
+
"category": "code_example",
|
|
277
|
+
"description": "Python example: image-to-image transform via Hugging Face /models/<model>",
|
|
278
|
+
"example_file": "llm/code-example-imagetoimage-requests/code-example-imagetoimage-v1.py.j2",
|
|
279
|
+
"is_active": true,
|
|
280
|
+
"is_public": true,
|
|
281
|
+
"meta": {
|
|
282
|
+
"requirements": [
|
|
283
|
+
"requests"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"mime_type": "python",
|
|
287
|
+
"preset_name": "llm_code_example_imagetoimage_requests",
|
|
288
|
+
"source_readme": "llm/code-example-imagetoimage-requests/README.md",
|
|
289
|
+
"version": 1
|
|
290
|
+
},
|
|
291
|
+
"llm_code_example_imagetoimage_shell_v1": {
|
|
292
|
+
"category": "code_example",
|
|
293
|
+
"description": "Bash example: image-to-image transform via Hugging Face /models/<model> using curl",
|
|
294
|
+
"example_file": "llm/code-example-imagetoimage-shell/code-example-imagetoimage-v1.sh.j2",
|
|
295
|
+
"is_active": true,
|
|
296
|
+
"is_public": true,
|
|
297
|
+
"meta": {},
|
|
298
|
+
"mime_type": "bash",
|
|
299
|
+
"preset_name": "llm_code_example_imagetoimage_shell",
|
|
300
|
+
"source_readme": "llm/code-example-imagetoimage-shell/README.md",
|
|
301
|
+
"version": 1
|
|
302
|
+
},
|
|
151
303
|
"llm_code_example_javascript_v1": {
|
|
152
304
|
"category": "code_example",
|
|
153
305
|
"description": "JavaScript example: send a chat completion request to an OpenAI-compatible LLM",
|
|
@@ -208,6 +360,18 @@
|
|
|
208
360
|
"source_readme": "llm/code-example-requests/README.md",
|
|
209
361
|
"version": 1
|
|
210
362
|
},
|
|
363
|
+
"llm_code_example_rerank_javascript_v1": {
|
|
364
|
+
"category": "code_example",
|
|
365
|
+
"description": "JavaScript example: rerank documents via /rerank",
|
|
366
|
+
"example_file": "llm/code-example-rerank-javascript/code-example-rerank-v1.js.j2",
|
|
367
|
+
"is_active": true,
|
|
368
|
+
"is_public": true,
|
|
369
|
+
"meta": {},
|
|
370
|
+
"mime_type": "javascript",
|
|
371
|
+
"preset_name": "llm_code_example_rerank_javascript",
|
|
372
|
+
"source_readme": "llm/code-example-rerank-javascript/README.md",
|
|
373
|
+
"version": 1
|
|
374
|
+
},
|
|
211
375
|
"llm_code_example_rerank_requests_v1": {
|
|
212
376
|
"category": "code_example",
|
|
213
377
|
"description": "Python example: rerank a candidate document set against a query",
|
|
@@ -224,6 +388,58 @@
|
|
|
224
388
|
"source_readme": "llm/code-example-rerank-requests/README.md",
|
|
225
389
|
"version": 1
|
|
226
390
|
},
|
|
391
|
+
"llm_code_example_rerank_shell_v1": {
|
|
392
|
+
"category": "code_example",
|
|
393
|
+
"description": "Bash example: rerank documents via /rerank using curl",
|
|
394
|
+
"example_file": "llm/code-example-rerank-shell/code-example-rerank-v1.sh.j2",
|
|
395
|
+
"is_active": true,
|
|
396
|
+
"is_public": true,
|
|
397
|
+
"meta": {},
|
|
398
|
+
"mime_type": "bash",
|
|
399
|
+
"preset_name": "llm_code_example_rerank_shell",
|
|
400
|
+
"source_readme": "llm/code-example-rerank-shell/README.md",
|
|
401
|
+
"version": 1
|
|
402
|
+
},
|
|
403
|
+
"llm_code_example_sentencetransformers_javascript_v1": {
|
|
404
|
+
"category": "code_example",
|
|
405
|
+
"description": "JavaScript example: sentence-similarity via HF sentence-transformers /models/<model>",
|
|
406
|
+
"example_file": "llm/code-example-sentencetransformers-javascript/code-example-sentencetransformers-v1.js.j2",
|
|
407
|
+
"is_active": true,
|
|
408
|
+
"is_public": true,
|
|
409
|
+
"meta": {},
|
|
410
|
+
"mime_type": "javascript",
|
|
411
|
+
"preset_name": "llm_code_example_sentencetransformers_javascript",
|
|
412
|
+
"source_readme": "llm/code-example-sentencetransformers-javascript/README.md",
|
|
413
|
+
"version": 1
|
|
414
|
+
},
|
|
415
|
+
"llm_code_example_sentencetransformers_requests_v1": {
|
|
416
|
+
"category": "code_example",
|
|
417
|
+
"description": "Python example: sentence-similarity via HF sentence-transformers /models/<model>",
|
|
418
|
+
"example_file": "llm/code-example-sentencetransformers-requests/code-example-sentencetransformers-v1.py.j2",
|
|
419
|
+
"is_active": true,
|
|
420
|
+
"is_public": true,
|
|
421
|
+
"meta": {
|
|
422
|
+
"requirements": [
|
|
423
|
+
"requests"
|
|
424
|
+
]
|
|
425
|
+
},
|
|
426
|
+
"mime_type": "python",
|
|
427
|
+
"preset_name": "llm_code_example_sentencetransformers_requests",
|
|
428
|
+
"source_readme": "llm/code-example-sentencetransformers-requests/README.md",
|
|
429
|
+
"version": 1
|
|
430
|
+
},
|
|
431
|
+
"llm_code_example_sentencetransformers_shell_v1": {
|
|
432
|
+
"category": "code_example",
|
|
433
|
+
"description": "Bash example: sentence-similarity via HF sentence-transformers /models/<model> using curl",
|
|
434
|
+
"example_file": "llm/code-example-sentencetransformers-shell/code-example-sentencetransformers-v1.sh.j2",
|
|
435
|
+
"is_active": true,
|
|
436
|
+
"is_public": true,
|
|
437
|
+
"meta": {},
|
|
438
|
+
"mime_type": "bash",
|
|
439
|
+
"preset_name": "llm_code_example_sentencetransformers_shell",
|
|
440
|
+
"source_readme": "llm/code-example-sentencetransformers-shell/README.md",
|
|
441
|
+
"version": 1
|
|
442
|
+
},
|
|
227
443
|
"llm_code_example_shell_v1": {
|
|
228
444
|
"category": "code_example",
|
|
229
445
|
"description": "Shell example: send a chat completion request to an OpenAI-compatible LLM via curl",
|
|
@@ -268,6 +484,18 @@
|
|
|
268
484
|
"source_readme": "llm/code-example-streaming-openai/README.md",
|
|
269
485
|
"version": 1
|
|
270
486
|
},
|
|
487
|
+
"llm_code_example_transcription_javascript_v1": {
|
|
488
|
+
"category": "code_example",
|
|
489
|
+
"description": "JavaScript example: transcribe audio via OpenAI-compatible /audio/transcriptions",
|
|
490
|
+
"example_file": "llm/code-example-transcription-javascript/code-example-transcription-v1.js.j2",
|
|
491
|
+
"is_active": true,
|
|
492
|
+
"is_public": true,
|
|
493
|
+
"meta": {},
|
|
494
|
+
"mime_type": "javascript",
|
|
495
|
+
"preset_name": "llm_code_example_transcription_javascript",
|
|
496
|
+
"source_readme": "llm/code-example-transcription-javascript/README.md",
|
|
497
|
+
"version": 1
|
|
498
|
+
},
|
|
271
499
|
"llm_code_example_transcription_requests_v1": {
|
|
272
500
|
"category": "code_example",
|
|
273
501
|
"description": "Python example: transcribe a pre-recorded audio file with an OpenAI-compatible audio transcription endpoint",
|
|
@@ -284,6 +512,30 @@
|
|
|
284
512
|
"source_readme": "llm/code-example-transcription-requests/README.md",
|
|
285
513
|
"version": 1
|
|
286
514
|
},
|
|
515
|
+
"llm_code_example_transcription_shell_v1": {
|
|
516
|
+
"category": "code_example",
|
|
517
|
+
"description": "Bash example: transcribe audio via OpenAI-compatible /audio/transcriptions using curl",
|
|
518
|
+
"example_file": "llm/code-example-transcription-shell/code-example-transcription-v1.sh.j2",
|
|
519
|
+
"is_active": true,
|
|
520
|
+
"is_public": true,
|
|
521
|
+
"meta": {},
|
|
522
|
+
"mime_type": "bash",
|
|
523
|
+
"preset_name": "llm_code_example_transcription_shell",
|
|
524
|
+
"source_readme": "llm/code-example-transcription-shell/README.md",
|
|
525
|
+
"version": 1
|
|
526
|
+
},
|
|
527
|
+
"llm_code_example_tts_javascript_v1": {
|
|
528
|
+
"category": "code_example",
|
|
529
|
+
"description": "JavaScript example: synthesize speech via OpenAI-compatible /audio/speech",
|
|
530
|
+
"example_file": "llm/code-example-tts-javascript/code-example-tts-v1.js.j2",
|
|
531
|
+
"is_active": true,
|
|
532
|
+
"is_public": true,
|
|
533
|
+
"meta": {},
|
|
534
|
+
"mime_type": "javascript",
|
|
535
|
+
"preset_name": "llm_code_example_tts_javascript",
|
|
536
|
+
"source_readme": "llm/code-example-tts-javascript/README.md",
|
|
537
|
+
"version": 1
|
|
538
|
+
},
|
|
287
539
|
"llm_code_example_tts_requests_v1": {
|
|
288
540
|
"category": "code_example",
|
|
289
541
|
"description": "Python example: synthesize speech from text using an OpenAI-compatible audio/speech endpoint",
|
|
@@ -300,6 +552,70 @@
|
|
|
300
552
|
"source_readme": "llm/code-example-tts-requests/README.md",
|
|
301
553
|
"version": 1
|
|
302
554
|
},
|
|
555
|
+
"llm_code_example_tts_shell_v1": {
|
|
556
|
+
"category": "code_example",
|
|
557
|
+
"description": "Bash example: synthesize speech via OpenAI-compatible /audio/speech using curl",
|
|
558
|
+
"example_file": "llm/code-example-tts-shell/code-example-tts-v1.sh.j2",
|
|
559
|
+
"is_active": true,
|
|
560
|
+
"is_public": true,
|
|
561
|
+
"meta": {},
|
|
562
|
+
"mime_type": "bash",
|
|
563
|
+
"preset_name": "llm_code_example_tts_shell",
|
|
564
|
+
"source_readme": "llm/code-example-tts-shell/README.md",
|
|
565
|
+
"version": 1
|
|
566
|
+
},
|
|
567
|
+
"llm_code_example_ttv_javascript_v1": {
|
|
568
|
+
"category": "code_example",
|
|
569
|
+
"description": "JavaScript example: text-to-video via HF /models/<model>",
|
|
570
|
+
"example_file": "llm/code-example-ttv-javascript/code-example-ttv-v1.js.j2",
|
|
571
|
+
"is_active": true,
|
|
572
|
+
"is_public": true,
|
|
573
|
+
"meta": {},
|
|
574
|
+
"mime_type": "javascript",
|
|
575
|
+
"preset_name": "llm_code_example_ttv_javascript",
|
|
576
|
+
"source_readme": "llm/code-example-ttv-javascript/README.md",
|
|
577
|
+
"version": 1
|
|
578
|
+
},
|
|
579
|
+
"llm_code_example_ttv_requests_v1": {
|
|
580
|
+
"category": "code_example",
|
|
581
|
+
"description": "Python example: text-to-video via HF /models/<model>",
|
|
582
|
+
"example_file": "llm/code-example-ttv-requests/code-example-ttv-v1.py.j2",
|
|
583
|
+
"is_active": true,
|
|
584
|
+
"is_public": true,
|
|
585
|
+
"meta": {
|
|
586
|
+
"requirements": [
|
|
587
|
+
"requests"
|
|
588
|
+
]
|
|
589
|
+
},
|
|
590
|
+
"mime_type": "python",
|
|
591
|
+
"preset_name": "llm_code_example_ttv_requests",
|
|
592
|
+
"source_readme": "llm/code-example-ttv-requests/README.md",
|
|
593
|
+
"version": 1
|
|
594
|
+
},
|
|
595
|
+
"llm_code_example_ttv_shell_v1": {
|
|
596
|
+
"category": "code_example",
|
|
597
|
+
"description": "Bash example: text-to-video via HF /models/<model> using curl",
|
|
598
|
+
"example_file": "llm/code-example-ttv-shell/code-example-ttv-v1.sh.j2",
|
|
599
|
+
"is_active": true,
|
|
600
|
+
"is_public": true,
|
|
601
|
+
"meta": {},
|
|
602
|
+
"mime_type": "bash",
|
|
603
|
+
"preset_name": "llm_code_example_ttv_shell",
|
|
604
|
+
"source_readme": "llm/code-example-ttv-shell/README.md",
|
|
605
|
+
"version": 1
|
|
606
|
+
},
|
|
607
|
+
"llm_code_example_vision_javascript_v1": {
|
|
608
|
+
"category": "code_example",
|
|
609
|
+
"description": "JavaScript example: describe an image via OpenAI-compatible /chat/completions vision messages",
|
|
610
|
+
"example_file": "llm/code-example-vision-javascript/code-example-vision-v1.js.j2",
|
|
611
|
+
"is_active": true,
|
|
612
|
+
"is_public": true,
|
|
613
|
+
"meta": {},
|
|
614
|
+
"mime_type": "javascript",
|
|
615
|
+
"preset_name": "llm_code_example_vision_javascript",
|
|
616
|
+
"source_readme": "llm/code-example-vision-javascript/README.md",
|
|
617
|
+
"version": 1
|
|
618
|
+
},
|
|
303
619
|
"llm_code_example_vision_requests_v1": {
|
|
304
620
|
"category": "code_example",
|
|
305
621
|
"description": "Python example: ask a vision-capable LLM about a publicly-hosted image",
|
|
@@ -316,6 +632,18 @@
|
|
|
316
632
|
"source_readme": "llm/code-example-vision-requests/README.md",
|
|
317
633
|
"version": 1
|
|
318
634
|
},
|
|
635
|
+
"llm_code_example_vision_shell_v1": {
|
|
636
|
+
"category": "code_example",
|
|
637
|
+
"description": "Bash example: describe an image via OpenAI-compatible /chat/completions using curl",
|
|
638
|
+
"example_file": "llm/code-example-vision-shell/code-example-vision-v1.sh.j2",
|
|
639
|
+
"is_active": true,
|
|
640
|
+
"is_public": true,
|
|
641
|
+
"meta": {},
|
|
642
|
+
"mime_type": "bash",
|
|
643
|
+
"preset_name": "llm_code_example_vision_shell",
|
|
644
|
+
"source_readme": "llm/code-example-vision-shell/README.md",
|
|
645
|
+
"version": 1
|
|
646
|
+
},
|
|
319
647
|
"llm_description_v1": {
|
|
320
648
|
"category": "getting_started",
|
|
321
649
|
"description": "Customer-facing overview of an OpenAI-compatible LLM gateway service",
|
{unitysvc_data-0.1.7 → unitysvc_data-0.1.8}/src/unitysvc_data/examples/api/connectivity/README.md
RENAMED
|
@@ -25,15 +25,13 @@ proxy variants, any endpoint fronted by an HTTP gateway). The script
|
|
|
25
25
|
| 5xx | fail | upstream broken |
|
|
26
26
|
| 000 | fail | connect / DNS / timeout |
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
modes, so the script does not branch on `local_testing`:
|
|
30
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
32
31
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
key (online mode). Sent as `Authorization: Bearer ...` when set.
|
|
32
|
+
## Environment variables (read at runtime)
|
|
33
|
+
|
|
34
|
+
- `UNITYSVC_API_KEY` — optional. Sent as `Authorization: Bearer ...` when set. Either the seller's upstream API key (local mode, when `upstream_access_config` carries one) or the customer's svcpass / BYOK secret (gateway mode).
|
|
37
35
|
|
|
38
36
|
## Versions
|
|
39
37
|
|
|
@@ -21,12 +21,16 @@ rather than `choices[].message.content`. So Anthropic-shaped
|
|
|
21
21
|
upstreams need their own preset rather than reusing
|
|
22
22
|
`llm_code_example_openai`.
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
25
25
|
|
|
26
|
-
- `
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
27
|
+
- `{{ routing_key.model }}` — model id, taken from the access interface's routing key.
|
|
28
|
+
|
|
29
|
+
## Environment variables (read at runtime)
|
|
30
|
+
|
|
31
|
+
Required:
|
|
32
|
+
|
|
33
|
+
- `UNITYSVC_API_KEY` — bearer token: customer's svcpass for gateway access, or an upstream API key when the seller / customer wires it as a secret (BYOK).
|
|
30
34
|
|
|
31
35
|
## Versions
|
|
32
36
|
|
unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-javascript/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "llm_code_example_embed_image_javascript"
|
|
3
|
+
category = "code_example"
|
|
4
|
+
mime_type = "javascript"
|
|
5
|
+
file = "code-example-embed-image.js.j2"
|
|
6
|
+
description = "JavaScript example: embed an image via /embed (Cohere v2-style)"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = true
|
|
9
|
+
+++
|
|
10
|
+
|
|
11
|
+
# llm / code-example-embed-image-javascript — image embeddings via `fetch`
|
|
12
|
+
|
|
13
|
+
Customer-facing Node.js example for `/embed` endpoints that accept a base64 data-URI image. Inlines the image as a data URI before posting.
|
|
14
|
+
|
|
15
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
16
|
+
|
|
17
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
18
|
+
- `{{ routing_key.model }}` — model id, taken from the access interface's routing key.
|
|
19
|
+
|
|
20
|
+
## Environment variables (read at runtime)
|
|
21
|
+
|
|
22
|
+
Required:
|
|
23
|
+
|
|
24
|
+
- `UNITYSVC_API_KEY` — bearer token: customer's svcpass for gateway access, or an upstream API key when the seller / customer wires it as a secret (BYOK).
|
|
25
|
+
|
|
26
|
+
Optional:
|
|
27
|
+
|
|
28
|
+
- `IMAGE_URL` — alternate test image URL.
|
|
29
|
+
|
|
30
|
+
## Versions
|
|
31
|
+
|
|
32
|
+
### v1 — initial release
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
async function main() {
|
|
2
|
+
const imageUrl =
|
|
3
|
+
process.env.IMAGE_URL ||
|
|
4
|
+
"https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg";
|
|
5
|
+
|
|
6
|
+
const imgResp = await fetch(imageUrl);
|
|
7
|
+
if (!imgResp.ok) throw new Error(`failed to fetch image: HTTP ${imgResp.status}`);
|
|
8
|
+
const buf = Buffer.from(await imgResp.arrayBuffer());
|
|
9
|
+
const mime = imgResp.headers.get("content-type") || "image/jpeg";
|
|
10
|
+
const dataUri = `data:${mime};base64,${buf.toString("base64")}`;
|
|
11
|
+
|
|
12
|
+
const response = await fetch("{{ service_base_url }}/embed", {
|
|
13
|
+
method: "POST",
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: `Bearer ${process.env.UNITYSVC_API_KEY}`,
|
|
16
|
+
"Content-Type": "application/json",
|
|
17
|
+
},
|
|
18
|
+
body: JSON.stringify({
|
|
19
|
+
model: "{{ routing_key.model }}",
|
|
20
|
+
input_type: "image",
|
|
21
|
+
embedding_types: ["float"],
|
|
22
|
+
images: [dataUri],
|
|
23
|
+
}),
|
|
24
|
+
});
|
|
25
|
+
if (!response.ok) {
|
|
26
|
+
throw new Error(`HTTP ${response.status}: ${await response.text()}`);
|
|
27
|
+
}
|
|
28
|
+
const data = await response.json();
|
|
29
|
+
const embedding = data.embeddings.float[0];
|
|
30
|
+
console.log(`got embedding of dimension ${embedding.length}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
main().catch((err) => {
|
|
34
|
+
console.error(err.message);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
});
|
unitysvc_data-0.1.8/src/unitysvc_data/examples/llm/code-example-embed-image-requests/README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "llm_code_example_embed_image_requests"
|
|
3
|
+
category = "code_example"
|
|
4
|
+
mime_type = "python"
|
|
5
|
+
file = "code-example-embed-image.py.j2"
|
|
6
|
+
description = "Python example: embed an image via /embed (Cohere v2-style)"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = true
|
|
9
|
+
meta = { requirements = ["requests"] }
|
|
10
|
+
+++
|
|
11
|
+
|
|
12
|
+
# llm / code-example-embed-image-requests — image embeddings via `requests`
|
|
13
|
+
|
|
14
|
+
Customer-facing Python example for `/embed` endpoints that accept a base64 data-URI image (Cohere v2 / similar). Fetches a public test image, inlines it as a data URI, and posts to the gateway.
|
|
15
|
+
|
|
16
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
17
|
+
|
|
18
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
19
|
+
- `{{ routing_key.model }}` — model id, taken from the access interface's routing key.
|
|
20
|
+
|
|
21
|
+
## Environment variables (read at runtime)
|
|
22
|
+
|
|
23
|
+
Required:
|
|
24
|
+
|
|
25
|
+
- `UNITYSVC_API_KEY` — bearer token: customer's svcpass for gateway access, or an upstream API key when the seller / customer wires it as a secret (BYOK).
|
|
26
|
+
|
|
27
|
+
Optional:
|
|
28
|
+
|
|
29
|
+
- `IMAGE_URL` — alternate test image URL.
|
|
30
|
+
|
|
31
|
+
## Versions
|
|
32
|
+
|
|
33
|
+
### v1 — initial release
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import urllib.request
|
|
3
|
+
|
|
4
|
+
import requests
|
|
5
|
+
|
|
6
|
+
image_url = os.environ.get(
|
|
7
|
+
"IMAGE_URL",
|
|
8
|
+
"https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg",
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# Fetch the image and base64-inline it as a data URI; matches the Cohere
|
|
12
|
+
# v2/embed payload shape.
|
|
13
|
+
import base64
|
|
14
|
+
import mimetypes
|
|
15
|
+
|
|
16
|
+
with urllib.request.urlopen(image_url, timeout=30) as resp:
|
|
17
|
+
image_bytes = resp.read()
|
|
18
|
+
mime, _ = mimetypes.guess_type(image_url)
|
|
19
|
+
mime = mime or "image/jpeg"
|
|
20
|
+
data_uri = f"data:{mime};base64,{base64.b64encode(image_bytes).decode()}"
|
|
21
|
+
|
|
22
|
+
response = requests.post(
|
|
23
|
+
"{{ service_base_url }}/embed",
|
|
24
|
+
headers={
|
|
25
|
+
"Authorization": f"Bearer {os.environ['UNITYSVC_API_KEY']}",
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
},
|
|
28
|
+
json={
|
|
29
|
+
"model": "{{ routing_key.model }}",
|
|
30
|
+
"input_type": "image",
|
|
31
|
+
"embedding_types": ["float"],
|
|
32
|
+
"images": [data_uri],
|
|
33
|
+
},
|
|
34
|
+
)
|
|
35
|
+
response.raise_for_status()
|
|
36
|
+
data = response.json()
|
|
37
|
+
embedding = data["embeddings"]["float"][0]
|
|
38
|
+
print(f"got embedding of dimension {len(embedding)}")
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
+++
|
|
2
|
+
preset_name = "llm_code_example_embed_image_shell"
|
|
3
|
+
category = "code_example"
|
|
4
|
+
mime_type = "bash"
|
|
5
|
+
file = "code-example-embed-image.sh.j2"
|
|
6
|
+
description = "Bash example: embed an image via /embed (Cohere v2-style) using curl"
|
|
7
|
+
is_active = true
|
|
8
|
+
is_public = true
|
|
9
|
+
+++
|
|
10
|
+
|
|
11
|
+
# llm / code-example-embed-image-shell — image embeddings via `curl`
|
|
12
|
+
|
|
13
|
+
Curl-based POST to `/embed` with a base64-inlined image data-URI.
|
|
14
|
+
|
|
15
|
+
## Template variables (filled in by the platform when rendering for a given access interface)
|
|
16
|
+
|
|
17
|
+
- `{{ service_base_url }}` — endpoint base URL, taken from the listing's access interface.
|
|
18
|
+
- `{{ routing_key.model }}` — model id, taken from the access interface's routing key.
|
|
19
|
+
|
|
20
|
+
## Environment variables (read at runtime)
|
|
21
|
+
|
|
22
|
+
Required:
|
|
23
|
+
|
|
24
|
+
- `UNITYSVC_API_KEY` — bearer token: customer's svcpass for gateway access, or an upstream API key when the seller / customer wires it as a secret (BYOK).
|
|
25
|
+
|
|
26
|
+
Optional:
|
|
27
|
+
|
|
28
|
+
- `IMAGE_URL` — alternate test image URL.
|
|
29
|
+
|
|
30
|
+
## Versions
|
|
31
|
+
|
|
32
|
+
### v1 — initial release
|