Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Dec 9, 2024

Important

Add metadata to kwargs in get_openai_args() if store is True to support OpenAI model distillation.

  • Behavior:
    • In get_openai_args() in langfuse/openai.py, add metadata to kwargs if store is True.
    • This change supports OpenAI model distillation by including metadata when store is enabled.

This description was created by Ellipsis for 258d183. It will automatically update as commits are pushed.

@hassiebp hassiebp changed the title fix(serializer): fallback on utf-8 decoder error fix(openai): pass metadata when model distillation feat is used Dec 9, 2024
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disclaimer: Experimental PR review

PR Summary

Enhanced OpenAI integration by adding metadata support in the get_openai_args method when the 'store' flag is enabled, enabling model distillation functionality.

  • Modified langfuse/openai.py to include metadata from args in kwargs when store=True
  • Added support for passing metadata through to OpenAI API calls for model distillation feature
  • Implemented fallback handling for UTF-8 decoder errors during serialization

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@hassiebp hassiebp enabled auto-merge (squash) December 9, 2024 09:29
@hassiebp hassiebp merged commit 89da281 into main Dec 9, 2024
9 of 10 checks passed
@hassiebp hassiebp deleted the fix-openai-pass-metadata-model-distillation branch December 9, 2024 09:47
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.

bug: OpenAI python wrapper: chat completion parameter metadata collides with langfuse wrapper parameter

2 participants