-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix: Add support for litellm Message type #1308
base: main
Are you sure you want to change the base?
Conversation
7746e54
to
8d59d77
Compare
8d59d77
to
7efda1e
Compare
Add support for litellm Message type
7efda1e
to
208ef0f
Compare
resolves #1303 |
from litellm.types.utils import ( | ||
Message as LitellmMessage, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why split the import here? it seems identical to the import above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, you're right.
if messages_as_dicts: | ||
_set_span_attribute(span, SpanAttributes.INPUT_VALUE, json.dumps(messages_as_dicts)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking but this makes the input a duplicate of the messages - bloating the payload. I sorta question whether we should continue to do this...
In any case if set to a JSON dumps I would set the MIME_TYPE here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it does. Happy to discontinue here, though not sure if anyone is specifically relying on it right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just going to move forward with this PR for now. Let's table whether we discontinue this practice across other instruments as well and discuss it later.
I'll add the MIME_TYPE.
Add support for litellm Message type