Skip to content

fix: set settings.model to stream chunk model in openai instrumentation #152

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

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

desaxce
Copy link
Contributor

@desaxce desaxce commented Nov 25, 2024

Changes:

  • in OpenAI instrumentation when streaming, set settings.model to model value given by stream chunk

To test:

  • Instrument OpenAI with client: literalai_client.instrument_openai()
  • run an OpenAI chat completions call with stream=True and model="gpt-4o-mini"
  • the Generation details page on platform should show the timestamped model like gpt-4o-mini-2024-07-18

Demo:
https://www.loom.com/share/2f359a2322764c65a555f66338e4f4e0

@Matthieu-OD Matthieu-OD self-requested a review November 26, 2024 14:11
@desaxce desaxce merged commit 5f4c92a into main Nov 27, 2024
2 checks passed
@desaxce desaxce deleted the hugues/eng-2154-thread-tree-step-view-name-for-llm-step branch November 27, 2024 14:30
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.

2 participants