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

Docs: improve custom tool guide #176

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Docs: improve custom tool guide #176

merged 2 commits into from
Jun 6, 2024

Conversation

lusmoura
Copy link
Collaborator

@lusmoura lusmoura commented Jun 5, 2024

AI Description

This PR updates the documentation for creating custom tools, specifically focusing on Langchain tools. It provides detailed guidance on implementing custom tools, including two illustrative examples:

  • Calculator Tool: This tool evaluates mathematical expressions. It includes a call() method, which receives a dictionary of parameters and returns a list of dictionary results with a "result" field.
  • Python Interpreter Tool: This tool executes arbitrary Python code against a Python interpreter. It demonstrates the usage of a secret interpreter_url set in the environment variables.

Changes:

  • Renames the "Implementing a Tool" section to "Implementing a Langchain Tool" for clarity.
  • Adds a new section, "Implementing a custom Tool", providing detailed instructions and examples for creating custom tools.
  • Includes two illustrative examples, the Calculator Tool and the Python Interpreter Tool, showcasing the implementation of the call() method and parameter handling.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@3af28b2). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #176   +/-   ##
=======================================
  Coverage        ?   87.90%           
=======================================
  Files           ?      114           
  Lines           ?     3662           
  Branches        ?        0           
=======================================
  Hits            ?     3219           
  Misses          ?      443           
  Partials        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@tianjing-li tianjing-li left a comment

Choose a reason for hiding this comment

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

Approved!

@lusmoura lusmoura merged commit 1d143e5 into main Jun 6, 2024
2 checks passed
@lusmoura lusmoura deleted the luisa/tool_guide branch June 6, 2024 15:12
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.

3 participants