Installation¶
QType can be installed in two different ways depending on your needs:
Interpreter Package Installation (Recommended)¶
For full functionality including the ability to execute QType flows, serve them as APIs, and launch user experiences, install with the interpreter extra:
Base Package Installation¶
The base QType package provides core functionality for defining, validating, and generating schemas for QType specifications:
What's included in the base package:¶
- Schema validation: Validate your QType YAML files against the specification
- File conversion: Convert between different QType formats
- Core DSL components: Define models, prompts, tools, and flows
- Basic CLI commands:
validate,generate,convert
Additional capabilities with the interpreter package:¶
- Flow execution: Run QType flows locally with the
runcommand - UI and API serving: Serve QType flows as web UI and APIs with the
servecommand - Multiple model Providers: Support for AWS Bedrock, OpenAI, and other LLM providers
- Embeddings and Detrieval: Built-in support for vector embeddings and retrieval
- Observability: Integrated telemetry and tracing with OpenTelemetry
Additional dependencies:¶
(These are installed by default with the interpreter package)
boto3- AWS SDK for Bedrock and other AWS servicesfastapi- Web framework for serving APIsuvicorn- ASGI server for FastAPIllama-index- LLM application framework with embeddings supportarize-phoenix-otel- OpenTelemetry instrumentation
Requirements¶
- Python 3.10 or higher
- Operating systems: macOS, Linux, Windows
Verification¶
After installation, verify that QType is working correctly:
# Check installation
qtype --help
# Validate a sample spec (base package)
qtype validate examples/hello_world.qtype.yaml
Then, edit .env and put in your OPENAI_KEY:
and run the example flow: