visionai-sdk-python 2.2.0.dev3__py3-none-any.whl → 2.2.0.dev4__py3-none-any.whl
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.
- visionai_sdk_python/relay/examples/__init__.py +28 -0
- visionai_sdk_python/relay/examples/error_connection.json +3 -0
- visionai_sdk_python/relay/examples/error_request.json +4 -0
- visionai_sdk_python/relay/examples/heartbeat.json +1 -0
- visionai_sdk_python/relay/examples/register.json +8 -0
- visionai_sdk_python/relay/examples/registered.json +4 -0
- visionai_sdk_python/relay/examples/request.json +17 -0
- visionai_sdk_python/relay/examples/response.json +9 -0
- visionai_sdk_python/relay/examples/response_text.json +5 -0
- {visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/METADATA +4 -3
- {visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/RECORD +13 -4
- {visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/WHEEL +0 -0
- {visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"""The ADR's JSON examples, shipped so every implementation tests against the same frames.
|
|
2
|
+
|
|
3
|
+
``example("register")`` is the parsed object, ``example_text("register")`` the wire text.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import json
|
|
7
|
+
from importlib.resources import files
|
|
8
|
+
|
|
9
|
+
NAMES = (
|
|
10
|
+
"register",
|
|
11
|
+
"registered",
|
|
12
|
+
"heartbeat",
|
|
13
|
+
"request",
|
|
14
|
+
"response",
|
|
15
|
+
"response_text",
|
|
16
|
+
"error_request",
|
|
17
|
+
"error_connection",
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def example_text(name: str) -> str:
|
|
22
|
+
"""One ADR example as the text that goes over the wire."""
|
|
23
|
+
return (files(__package__) / f"{name}.json").read_text(encoding="utf-8")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def example(name: str) -> dict:
|
|
27
|
+
"""One ADR example as a dict, for building or comparing frames in tests."""
|
|
28
|
+
return json.loads(example_text(name))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "heartbeat"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
{"type": "register",
|
|
2
|
+
"agent_id": "platform-edge-agent-7d9f4b6c8-xk2pq",
|
|
3
|
+
"cluster_id": "aws-offline-edge",
|
|
4
|
+
"workspaces": [{"id": "31a6638a-5c2e-4f1b-9a7d-0e3c6b8d2f41",
|
|
5
|
+
"models": [{"name": "cr2-8b", "version": "4.5.0", "replicas": 2},
|
|
6
|
+
{"name": "cr2-8b", "version": "4.6.0", "replicas": 1}]},
|
|
7
|
+
{"id": "7589d018-2b4c-4e6f-8a1d-3c5e7f9b1d23", "models": []},
|
|
8
|
+
{"id": "QA Workspace", "models": []}]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{"type": "request",
|
|
2
|
+
"request_id": "7f3c2a1e-9d4b-4c8a-b2e6-1f5d3a7c9e0b",
|
|
3
|
+
"workspace_id": "31a6638a-5c2e-4f1b-9a7d-0e3c6b8d2f41",
|
|
4
|
+
"method": "POST",
|
|
5
|
+
"path": "/api/chat",
|
|
6
|
+
"headers": {"Authorization": "Bearer eyJhbGciOi…",
|
|
7
|
+
"X-Request-Source": "dataverse",
|
|
8
|
+
"Content-Type": "application/json"},
|
|
9
|
+
"body": {"img": "data:image/jpeg;base64,/9j/4AAQ…",
|
|
10
|
+
"prompt": "Describe the scene.",
|
|
11
|
+
"temperature": 0.2, "max_tokens": 500, "top_p": 0.7,
|
|
12
|
+
"stream": false, "use_cache": true, "num_beams": 1,
|
|
13
|
+
"model": "cr2-8b", "model_version": null,
|
|
14
|
+
"api_endpoint": null, "hook": null,
|
|
15
|
+
"keep_alive": true, "use_response_postprocess": true,
|
|
16
|
+
"workspace_id": "31a6638a-5c2e-4f1b-9a7d-0e3c6b8d2f41"},
|
|
17
|
+
"timeout_s": 100}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{"type": "response",
|
|
2
|
+
"request_id": "7f3c2a1e-9d4b-4c8a-b2e6-1f5d3a7c9e0b",
|
|
3
|
+
"status": 200,
|
|
4
|
+
"headers": {"Content-Type": "application/json"},
|
|
5
|
+
"body": {"chat_id": "high:1760424000123-3f9a1c7e",
|
|
6
|
+
"status": "completed",
|
|
7
|
+
"message": "{\"description\": \"A forklift in a warehouse aisle.\"}",
|
|
8
|
+
"dispatch": {"model_name": "cr2-8b", "model_version": "4.5.0",
|
|
9
|
+
"api_endpoint": "http://cr2-8b:8000"}}}
|
{visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: visionai-sdk-python
|
|
3
|
-
Version: 2.2.0.
|
|
3
|
+
Version: 2.2.0.dev4
|
|
4
4
|
Summary: VisionAI SDK for Python
|
|
5
5
|
Author-email: Tony Yang <tonyyang@linkervision.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -170,8 +170,9 @@ authentication wins. `vlm_url` is optional for clients that only authenticate.
|
|
|
170
170
|
platform-edge-agent: the frame models, the constants and `parse_agent_frame()` /
|
|
171
171
|
`parse_relay_frame()` / `dump_frame()`. The spec is platform-service's
|
|
172
172
|
`docs/adr/0001-relay-protocol.md`; both sides import this module instead of keeping a
|
|
173
|
-
copy
|
|
174
|
-
|
|
173
|
+
copy. The ADR's JSON examples ship with it (`visionai_sdk_python.relay.examples`:
|
|
174
|
+
`example(name)` / `example_text(name)`), so every implementation tests against the same
|
|
175
|
+
frames. It is internal to the platform and not a public API.
|
|
175
176
|
|
|
176
177
|
## VLM Inference
|
|
177
178
|
|
{visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/RECORD
RENAMED
|
@@ -18,13 +18,22 @@ visionai_sdk_python/auth/models.py,sha256=u6MDFYaWMyf08XCrGZzwPHv43d6AElH9XO2QSj
|
|
|
18
18
|
visionai_sdk_python/auth/resource.py,sha256=3PgcxH8N6unKTs2jSQhMeJT_lg6bTce0hz0bzuID12U,5446
|
|
19
19
|
visionai_sdk_python/relay/__init__.py,sha256=N4DuhutN8P4EWZRFIaWTqvylNsLkzRSkHMRRF2pknFk,1296
|
|
20
20
|
visionai_sdk_python/relay/protocol.py,sha256=Hy7J4kgDxaKy0WOrtkmqD5xUFXgKAVXwTWX4NQ9yQHE,5561
|
|
21
|
+
visionai_sdk_python/relay/examples/__init__.py,sha256=GvjlP-EtrhDVgqReOYqcf1mObND61vO6Q8CT_YFfgDM,732
|
|
22
|
+
visionai_sdk_python/relay/examples/error_connection.json,sha256=stjkXo27Vkhoy0rNtPUti2OEXzioxJ8Aqgyq2hAdquA,81
|
|
23
|
+
visionai_sdk_python/relay/examples/error_request.json,sha256=iUB11sSf1vuBAdzvoiHAoUoifZoG4-wGBK6gb0ConjA,228
|
|
24
|
+
visionai_sdk_python/relay/examples/heartbeat.json,sha256=CZKMBTkVxtLzY05bQW7AkCULJAIu-7RUVjgc7hTgg9I,22
|
|
25
|
+
visionai_sdk_python/relay/examples/register.json,sha256=dxpuAsXQhwUb0CZm0xNfj_JkoA8wFPyf49SQuW4aeKI,472
|
|
26
|
+
visionai_sdk_python/relay/examples/registered.json,sha256=SW2vzae2ctLNJE7zGZ_3fk9oj48g9WZz7QpOs9eMbTw,233
|
|
27
|
+
visionai_sdk_python/relay/examples/request.json,sha256=J2XJnxSrZnAde11CUUUkVL1y0PdK9basdr4idpSLRLk,794
|
|
28
|
+
visionai_sdk_python/relay/examples/response.json,sha256=DIzigd4XbH25HeQ4HFsfE8JFERILFOxHSyr8dyHdV2w,443
|
|
29
|
+
visionai_sdk_python/relay/examples/response_text.json,sha256=NRuP-l58xqVBWvOgrwReeDRnOCKtY-it-hq5UYASTug,185
|
|
21
30
|
visionai_sdk_python/vlm/__init__.py,sha256=EDd7ZG4k7inn8qqkyIhO3xI_4MPMWJT5Npsient-tTc,571
|
|
22
31
|
visionai_sdk_python/vlm/_mixin.py,sha256=TkqezNpW8QEe9pujsvx1APcylYQYr_PvHruEz4Le3JQ,1718
|
|
23
32
|
visionai_sdk_python/vlm/async_resource.py,sha256=meMUfBDa0g1hk7vFZq2fDuIQ1-QUpU0BUJtbvuG8UEY,3461
|
|
24
33
|
visionai_sdk_python/vlm/models.py,sha256=yDFjo4LfAxqXYBnl6ZW7YUJQoKKRkQWtqBJi2ruI6Jw,984
|
|
25
34
|
visionai_sdk_python/vlm/preprocess.py,sha256=ZpJJa13h8_YKwh_P7Pn8WIXV0x-r2xJi-ETgCFsGw-Y,7892
|
|
26
35
|
visionai_sdk_python/vlm/resource.py,sha256=4eMQ4ACcgd7nUfdRyADWmPd8yZ--uqQC4zwzBft68lg,3386
|
|
27
|
-
visionai_sdk_python-2.2.0.
|
|
28
|
-
visionai_sdk_python-2.2.0.
|
|
29
|
-
visionai_sdk_python-2.2.0.
|
|
30
|
-
visionai_sdk_python-2.2.0.
|
|
36
|
+
visionai_sdk_python-2.2.0.dev4.dist-info/METADATA,sha256=sTQXZIrAJy5ANXFc2Up7r5BIeY8adzLhErAmTJh0Bjw,30521
|
|
37
|
+
visionai_sdk_python-2.2.0.dev4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
38
|
+
visionai_sdk_python-2.2.0.dev4.dist-info/top_level.txt,sha256=79a5MCSLLv6Mbfun-8RS-G6O927hahBwDqJjeuWLdvM,20
|
|
39
|
+
visionai_sdk_python-2.2.0.dev4.dist-info/RECORD,,
|
|
File without changes
|
{visionai_sdk_python-2.2.0.dev3.dist-info → visionai_sdk_python-2.2.0.dev4.dist-info}/top_level.txt
RENAMED
|
File without changes
|