Skip to main content

Template schema and validation for Mosaic UI SDK

Project description

mosaic-ui-schema

Template schema and validation for mosaic-ui-sdk.

Provides Pydantic v2 models, JSON Schema export, and validation utilities for producing valid Mosaic UI template JSON.

Install

pip install mosaic-ui-schema

Usage

Function Calling / Tool Use

from mosaic_ui_schema import get_template_schema

schema = get_template_schema()
# Pass schema as tool parameters to LLM

Validate LLM output

from mosaic_ui_schema import validate, to_json

template = validate(llm_output_dict)
json_str = to_json(template)  # Send to SDK

Single slot schema (for step-by-step generation)

from mosaic_ui_schema import get_slot_schema

table_schema = get_slot_schema("table")
form_schema = get_slot_schema("form")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mosaic_ui_schema-1.1.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mosaic_ui_schema-1.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file mosaic_ui_schema-1.1.0.tar.gz.

File metadata

  • Download URL: mosaic_ui_schema-1.1.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for mosaic_ui_schema-1.1.0.tar.gz
Algorithm Hash digest
SHA256 10127803a46b4887fdb17adbf50c91b9d03eff57488ef349bbeb1e6fc2370158
MD5 0ad4e80c240a6047423ec84df4b2f053
BLAKE2b-256 7e16439f7031189b5764d497dd6721cfda7de21d57635dc3828267e83217abd1

See more details on using hashes here.

File details

Details for the file mosaic_ui_schema-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mosaic_ui_schema-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4c69da3b0fefa2e9d4331525ce6865548727ffbd617a8eb8376005f6514a488
MD5 984cd967103eba8b2711171db5dc43ca
BLAKE2b-256 11ec9b97dd1869adc8e64ab5250e05ff9ef51e4dcfce07bf4c99bedb11d3eb91

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page