Documentation Index
Fetch the complete documentation index at: https://docs.moda.dev/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Moda automatically tracks your OpenAI API calls. Chat completions, streaming, function calling, and tool use are all captured with no additional code required.Setup
Supported Features
| Feature | Captured |
|---|---|
| Chat completions | Yes |
| Streaming | Yes |
| Function calling / tool use | Yes (captured as content blocks) |
| Embeddings | Yes |
| Token usage | Yes (input, output, total) |
| Model name | Yes (request and response) |
Streaming
Streaming responses are automatically tracked. The SDK captures the complete response after the stream finishes:Tool Use
Tool calls and function calling are automatically captured with full input/output details:Troubleshooting
Data not appearing?- Ensure
moda.init()is called before creating the OpenAI client - Call
moda.flush()(Python) orawait Moda.flush()(Node.js) before exit - Verify your API key is correct
- The SDK captures the full response after the stream ends. Ensure you consume the entire stream.
For full SDK documentation, see the Python SDK or Node.js SDK guides.