monocle2ai / monocle

Monocle is a framework for tracing GenAI app code. This repo contains implementation of Monocle for GenAI apps written in Python.
http://monocle2ai.org
Apache License 2.0
11 stars 5 forks source link

added event generation for non-async llm and retriever processing #15

Closed oi-raanne closed 2 months ago

oi-raanne commented 2 months ago

Proposed changes

input and output of an LLM are being captured as events in span. For retriever, they are captured as context_input and context_output. Earlier all of them are captured in attributes of span, which allows only key-value pairs, where value can be of primitive type only.

Types of changes

What types of changes does your code introduce to this project? Put an x in the boxes that apply

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...