Skip to content

Conversation

@hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Nov 13, 2024

Important

Fix _get_langfuse_data_from_kwargs() in langfuse/openai.py to only include n in modelParameters if greater than 1.

  • Behavior:
    • In langfuse/openai.py, modify _get_langfuse_data_from_kwargs() to only include n in modelParameters if parsed_n > 1.

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

@hassiebp hassiebp enabled auto-merge (squash) November 13, 2024 21:44
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

Modified OpenAI integration to optimize model parameter logging by only including the 'n' parameter when its value exceeds 1, resulting in cleaner and more relevant logging data.

  • Updated _get_langfuse_data_from_kwargs function in langfuse/openai.py to conditionally include 'n' parameter
  • Maintains backward compatibility while reducing unnecessary parameter logging
  • Improves clarity of model parameter data by excluding default values

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

@hassiebp hassiebp merged commit 4dfe2be into main Nov 13, 2024
10 checks passed
@hassiebp hassiebp deleted the fix-parsed-n branch November 13, 2024 21:57
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