Introduction#
DSPy is a declarative framework for building modular AI software with structured code instead of brittle prompts, offering algorithms that compile AI programs into effective prompts and weights for language models across classifiers, RAG pipelines, and agent loops.
Integration Steps#
Create an account and generate an API key
Set up your Helicone API key in your .env file
Create a .env file in your project.
Install DSPy
Install required dependencies
Start using DSPy with Helicone
View requests in the Helicone dashboard
Verify your requests in Helicone
While you're here, why not give us a star on GitHub? It helps us a lot!
Complete Working Examples#
Basic Chain of Thought#
Custom Generation Configuration#
Configure temperature, max_tokens, and other parameters:
Tracking with Custom Properties#
Add custom properties to track and filter your requests in the Helicone dashboard:
Helicone Prompts Integration#
Use Helicone Prompts for centralized prompt management with DSPy signatures:
Learn more about Prompts with AI Gateway.
Advanced Features#
Rate Limiting#
Configure rate limits for your DSPy applications:
Caching#
Enable intelligent caching to reduce costs:
Session Tracking for Multi-Turn Conversations#
Track entire conversation flows in DSPy programs:
Related Documentation#
Learn about Helicone's AI Gateway features and capabilities
Configure intelligent routing and automatic failover
Browse all available models and providers
Version and manage prompts with Helicone Prompts
Add metadata to track and filter your requests
Track multi-turn conversations and user sessions
Configure rate limits for your applications
Reduce costs and latency with intelligent caching
