Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add telemetry for Instructor.chat_completion #83

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vkryukov
Copy link

Here is a quick way to add telemetry to Instructor.chat_completion. It provides the following benefits:

  • A standard Elixir way to do telemetry
  • Captures all relevant information, including raw LLM response and time it took to respond, to help with debugging
  • Can add additional measurement (e.g., number of tokens consumed) but that would require adjusting the Instructor.Adapter behavior

Let me know if you want me to modify it in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant