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
1
2
Create a
.env file in your project.3
Python
4
Python
5
Complete Working Examples
Basic Chain of Thought
Python
Custom Generation Configuration
Configure temperature, max_tokens, and other parameters:Python
Tracking with Custom Properties
Add custom properties to track and filter your requests in the Helicone dashboard:Python
Helicone Prompts Integration
Use Helicone Prompts for centralized prompt management with DSPy signatures:Python
Learn more about Prompts with AI Gateway.
Advanced Features
Rate Limiting
Configure rate limits for your DSPy applications:Python
Caching
Enable intelligent caching to reduce costs:Python
Session Tracking for Multi-Turn Conversations
Track entire conversation flows in DSPy programs:Python
Related Documentation
AI Gateway Overview
Learn about Helicone’s AI Gateway features and capabilities
Provider Routing
Configure intelligent routing and automatic failover
Model Registry
Browse all available models and providers
Prompt Management
Version and manage prompts with Helicone Prompts
Custom Properties
Add metadata to track and filter your requests
Sessions
Track multi-turn conversations and user sessions
Rate Limiting
Configure rate limits for your applications
Caching
Reduce costs and latency with intelligent caching