feat: add documentation for agent visualization using Graphviz
This commit is contained in:
parent
6f2f7293a0
commit
c745fe156a
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ Agent visualization allows you to generate a structured graphical representation
|
|||
The visualization functionality relies on the **Graphviz** package. To use it, ensure you have Graphviz installed and add it as a dependency in `pyproject.toml`. Alternatively, install it directly via pip:
|
||||
|
||||
```bash
|
||||
pip install graphviz
|
||||
pip install openai-agents[visualization]
|
||||
```
|
||||
|
||||
## Generating a Graph
|
||||
|
|
@ -22,7 +22,7 @@ You can generate an agent visualization using the `draw_graph` function. This fu
|
|||
|
||||
```python
|
||||
from agents import Agent, function_tool
|
||||
from agents.visualizations import draw_graph
|
||||
from agents.extensions.visualization import draw_graph
|
||||
|
||||
@function_tool
|
||||
def get_weather(city: str) -> str:
|
||||
Loading…
Reference in a new issue