Skip to content

Commit 8853c66

Browse files
committed
Regenerate llms.txt to include autogen
1 parent 6988a94 commit 8853c66

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

llms.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,43 @@ You can use OpenInference's `using_attributes` context manager to capture additi
16151615
```python
16161616
from openinference.instrumentation import using_attributes
16171617

1618+
def main():
1619+
with using_attributes(
1620+
session_id="my-test-session",
1621+
user_id="my-test-user",
1622+
tags=["tag-1", "tag-2"],
1623+
metadata={"foo": "bar"},
1624+
):
1625+
# Your LLM call
1626+
```
1627+
1628+
### Autogen (experimental)
1629+
1630+
Installation:
1631+
1632+
```bash
1633+
pip install openinference-instrumentation-autogen
1634+
```
1635+
1636+
**Note:** The Autogen integration is currently experimental and may have limitations or unexpected behavior.
1637+
1638+
Then, instrument Autogen:
1639+
1640+
```python
1641+
from openinference.instrumentation.autogen import AutogenInstrumentor
1642+
1643+
AutogenInstrumentor().instrument()
1644+
```
1645+
1646+
That's it! You can now see the traces from inside Autogen in the LangWatch dashboard.
1647+
1648+
## Capturing Metadata
1649+
1650+
You can use OpenInference's `using_attributes` context manager to capture additional information for your LLM calls, such as the user_id, session_id (equivalent to thread id), tags and metadata:
1651+
1652+
```python
1653+
from openinference.instrumentation import using_attributes
1654+
16181655
def main():
16191656
with using_attributes(
16201657
session_id="my-test-session",

0 commit comments

Comments
 (0)