pydantic / logfire

Uncomplicated Observability for Python and beyond! 🪵🔥
https://docs.pydantic.dev/logfire/
MIT License
1.63k stars 46 forks source link

Allow instrumenting OpenAI/Anthropic client classes or modules #191

Closed alexmojaki closed 1 month ago

alexmojaki commented 1 month ago

For a user who wanted to just logfire.instrument_openai() without passing a client, since they want to instrument langchain which doesn't expose/accept an openai client object: https://pydanticlogfire.slack.com/archives/C06EDRBSAH3/p1715977569378699

cloudflare-pages[bot] commented 1 month ago

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 76f8c45
Status: âœ…  Deploy successful!
Preview URL: https://ef37eff9.logfire-docs.pages.dev
Branch Preview URL: https://alex-instrument-llm-class.logfire-docs.pages.dev

View logs

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

:loudspeaker: Thoughts on this report? Let us know!

alexmojaki commented 1 month ago

@willbakst might be interested in reviewing too.