Skip to content

Instantly share code, notes, and snippets.

@alan-andrade
Created July 7, 2025 12:32
Show Gist options
  • Select an option

  • Save alan-andrade/923fe61f594f8e7296355f417ab16d7d to your computer and use it in GitHub Desktop.

Select an option

Save alan-andrade/923fe61f594f8e7296355f417ab16d7d to your computer and use it in GitHub Desktop.
# Instrumenting the root trace...
if run := get_current_run_tree():
# Useful to attach feedback
if custom_id:
# Invalid UUID format in custom_id header will be ignored
with contextlib.suppress(ValueError):
run.run_id = UUID(custom_id)
# Sending feedback
feedback = langsmith_client.create_feedback(
run_id=custom_id,
key="user_acceptance",
value=input.response_type,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment