instructor_ex icon indicating copy to clipboard operation
instructor_ex copied to clipboard

Add telemetry for Instructor.chat_completion

Open vkryukov opened this issue 1 year ago • 0 comments

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.

vkryukov avatar Nov 21 '24 19:11 vkryukov