Skip to content

Commit

Permalink
docs: DSPy doc updates (GITBOOK-886)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jgilhuly authored and gitbook-bot committed Oct 10, 2024
1 parent 38fc7ba commit b00def9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/tracing/integrations-tracing/dspy.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ from openinference.instrumentation.dspy import DSPyInstrumentor
DSPyInstrumentor().instrument(tracer_provider=tracer_provider)
```

DSPy uses LiteLLM under the hood to handle LLM calls. By also instrumenting LiteLLM, you'll be able to see token counts on your DSPy spans and traces.

```python
from openinference.instrumentation.litellm import LiteLLMInstrumentor

LiteLLMInstrumentor().instrument(tracer_provider=tracer_provider)
```

## Run DSPy

Now run invoke your compiled DSPy module. Your traces should appear inside of Phoenix.
Expand Down

0 comments on commit b00def9

Please sign in to comment.