Shared Pydantic schemas for APIPod services and clients: requests, responses, streaming chunks and provider transport envelopes.
Project description
socaity-schemas
Shared Pydantic models for APIPod services and their clients. One definition, used on both sides of the wire, so a service and a client never drift apart on field names or shapes.
Three groups:
media_files:FileModeland its typed variants (ImageFileModel,AudioFileModel,VideoFileModel,ThreeDFileModel). The wire shape of a media-toolkit file: name, content type, and content as base64 or URL.schemas: OpenAI-compatible request and response models (chat, completion, embedding, image, video, audio, vision, 3D) plus streaming chunks (ChatCompletionChunk).transport: provider job envelopes (SocaityJobResponse,RunpodJobResponse,ReplicateJobResponse), their link/metric sub-models, and theStreamingResponsesentinel.service_definitions: registry models (ServiceDefinition,EndpointDefinition,ServiceAddressvariants, parameter metadata) shared by APIPodRegistry and fastSDK.
from socaity_schemas import ChatCompletionRequest, ServiceDefinition, SocaityJobResponse
from socaity_schemas.service_definitions import RunpodServiceAddress
The schema shape mirrors the OpenAI API so OpenAI-compatible clients work without translation. That is about the wire format only: any provider (Flux, Whisper, ElevenLabs, in-house models) that matches the shape is a valid backend.
Install
pip install socaity-schemas
MIT-licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file socaity_schemas-0.0.1.tar.gz.
File metadata
- Download URL: socaity_schemas-0.0.1.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fee5fe1533aa289645a7f53a3e72118d2e1c6afd4b6121aa38c042723bdf56c7
|
|
| MD5 |
3de75e362ac587893bff575993a20962
|
|
| BLAKE2b-256 |
307e829ccdba5b03ae9a6a74ddb01adb2387dd854fb49b37db3e6b010f327063
|
File details
Details for the file socaity_schemas-0.0.1-py3-none-any.whl.
File metadata
- Download URL: socaity_schemas-0.0.1-py3-none-any.whl
- Upload date:
- Size: 26.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
071c169ba448061ca17200f041444994bcfb2c9985cb2d1c63c75cf925898ed5
|
|
| MD5 |
663a590e4db34721378872d7873713e4
|
|
| BLAKE2b-256 |
82eb50074c1b43bb0c9f688b09b74698259d4b66c51e72979c66744b45b31887
|