Skip to content
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(datasets): url encode dataset name and run name #980

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Oct 28, 2024

Important

URL encoding added for dataset and run names in several functions in langfuse/client.py to handle special characters in API requests.

  • Behavior:
    • URL encode dataset_name in get_dataset(), get_dataset_runs(), get_dataset_run(), create_dataset(), and create_dataset_item().
    • URL encode dataset_run_name in get_dataset_run().
  • Functions:
    • Use _url_encode() method for encoding in the above functions.

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

@hassiebp hassiebp enabled auto-merge (squash) October 28, 2024 13:43
@hassiebp hassiebp linked an issue Oct 28, 2024 that may be closed by this pull request
Copy link

@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

Added URL encoding for dataset and run names in the Langfuse Python client to properly handle special characters in API requests.

  • Added _url_encode method in /langfuse/client.py using urllib.parse.quote for URL encoding
  • Modified get_dataset, get_dataset_runs, and get_dataset_run methods to encode dataset names and run names
  • Updated create_dataset and create_dataset_item methods to handle encoded names
  • Ensures proper handling of special characters in dataset/run identifiers for API requests

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

@hassiebp hassiebp merged commit 9b24854 into main Oct 28, 2024
11 checks passed
@hassiebp hassiebp deleted the hassieb/lfe-2519-encode-run-names branch October 28, 2024 13:56
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: python sdk does not url encode run names
1 participant