DSL for Generative AI Prototyping
Project description
QType
QType is a domain-specific language (DSL) for rapid prototyping of AI applications.
It is designed to help developers define modular, composable AI systems using a structured YAML-based specification. QType supports models, prompts, tools, retrievers, and flow orchestration, and is extensible for code generation or live interpretation.
🚀 Quick Start
Install QType:
pip install qtype[interpreter]
Create a file hello_world.qtype.yaml that answers a question:
id: hello_world
flows:
- id: chat_example
description: A simple chat flow with OpenAI
mode: Chat
steps:
- id: llm_inference_step
model:
id: gpt-4
provider: openai
auth:
id: openai_auth
type: api_key
api_key: ${OPENAI_KEY}
system_message: |
You are a helpful assistant.
inputs:
- id: user_message
type: ChatMessage
outputs:
- id: response
type: ChatMessage
Put your openai api key into your .env file:
echo "OPENAI_KEY=sk...." >> .env
Validate it's semantic correctness:
qtype validate hello_world.qtype.yaml
You should see:
INFO: ✅ Schema validation successful.
INFO: ✅ Model validation successful.
INFO: ✅ Language validation successful
INFO: ✅ Semantic validation successful
Launch the interpreter:
qtype serve hello_world.qtype.yaml`
And go to http://localhost:8000/ui to see the user interface for your application:
See the full docs for more examples and guides.
🤝 Contributing
Contributions welcome! Please follow the instructions in the contribution guide.
📄 License
This project is licensed under the MIT License.
See the LICENSE file for details.
🧠 Philosophy
QType is built around modularity, traceability, and rapid iteration. It aims to empower developers to quickly scaffold ideas into usable AI applications without sacrificing maintainability or control.
Stay tuned for upcoming features like:
- Integrated OpenTelemetry tracing
- Validation via LLM-as-a-judge
- UI hinting via input display types
- Flow state switching and conditional routing
Happy hacking with QType! 🛠️
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 qtype-0.1.3.tar.gz.
File metadata
- Download URL: qtype-0.1.3.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e9931161ca3f256f7006bfd84af2d7f026595023d8a988ad3c01e5a409cf90c
|
|
| MD5 |
714c8f1e134cafb22b662d3a610098e7
|
|
| BLAKE2b-256 |
a760c535a8f489af85e0c19382c2e95ada299ba28fa5c45d66d197106eb369fa
|
Provenance
The following attestation bundles were made for qtype-0.1.3.tar.gz:
Publisher:
publish-pypi.yml on bazaarvoice/qtype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qtype-0.1.3.tar.gz -
Subject digest:
1e9931161ca3f256f7006bfd84af2d7f026595023d8a988ad3c01e5a409cf90c - Sigstore transparency entry: 716014929
- Sigstore integration time:
-
Permalink:
bazaarvoice/qtype@20972e27140a4133621972a14e797cb8cd23469c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/bazaarvoice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@20972e27140a4133621972a14e797cb8cd23469c -
Trigger Event:
release
-
Statement type:
File details
Details for the file qtype-0.1.3-py3-none-any.whl.
File metadata
- Download URL: qtype-0.1.3-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7be9a5544346f4afc6e55da515639fe7c26c6ca5d3c290413d39348f7970b42f
|
|
| MD5 |
e9c3b76d3da06ff7c473c220f9aa8d22
|
|
| BLAKE2b-256 |
393396c2c1d46112a12923cbbe87ed3050a07109ae494372092684f50e7dfd36
|
Provenance
The following attestation bundles were made for qtype-0.1.3-py3-none-any.whl:
Publisher:
publish-pypi.yml on bazaarvoice/qtype
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qtype-0.1.3-py3-none-any.whl -
Subject digest:
7be9a5544346f4afc6e55da515639fe7c26c6ca5d3c290413d39348f7970b42f - Sigstore transparency entry: 716014933
- Sigstore integration time:
-
Permalink:
bazaarvoice/qtype@20972e27140a4133621972a14e797cb8cd23469c -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/bazaarvoice
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@20972e27140a4133621972a14e797cb8cd23469c -
Trigger Event:
release
-
Statement type: