Skip to content

fix(bonus-unit2): update deprecated Langfuse API and add missing ddgs dependency#681

Open
meatballg1210 wants to merge 1 commit into
huggingface:mainfrom
meatballg1210:meatballg1210-patch-1
Open

fix(bonus-unit2): update deprecated Langfuse API and add missing ddgs dependency#681
meatballg1210 wants to merge 1 commit into
huggingface:mainfrom
meatballg1210:meatballg1210-patch-1

Conversation

@meatballg1210
Copy link
Copy Markdown

Problem

  1. The "Additional Attributes" section uses deprecated Langfuse Python SDK v3 APIs
    that have been removed in v4:

    • start_as_current_span() → replaced by start_as_current_observation()
    • span.update_trace() → replaced by propagate_attributes()
  2. DuckDuckGoSearchTool requires the ddgs package which is not included
    in the install command. It belongs to smolagents' toolkit optional group,
    not telemetry, so smolagents[telemetry] does not install it.

Changes

  1. Updated "Additional Attributes" code: start_as_current_span
    start_as_current_observation, update_tracepropagate_attributes
  2. Added ddgs to the pip install command in Step 0

Verification

  • Tested in a clean Google Colab environment
  • Without ddgs: DuckDuckGoSearchTool() fails with ModuleNotFoundError
  • With ddgs added: works correctly
  • Confirmed new API matches Langfuse SDK v4 documentation

References

… dependency

Update deprecated start_as_current_span/update_trace to v4 API  and add ddgs to install command for DuckDuckGoSearchTool.
@meatballg1210
Copy link
Copy Markdown
Author

Hi maintainers 👋 There's still 1 workflow awaiting approval. It would be great if someone could approve it and review the changes when you have a moment. Happy to address any feedback. Thanks!

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.

1 participant