Skip to content

Conversation

@swappysh
Copy link
Contributor

@swappysh swappysh commented Jun 1, 2023

Throwing ToolException when incorrect arguments are passed to tools so that that agent can course correct them.

Incorrect argument count handling

I was facing an error where the agent passed incorrect arguments to tools. As per the discussions going around, I started throwing ToolException to allow the model to course correct.

Before submitting

Who can review?

Community members can review the PR once tests pass. Tag maintainers/contributors who might be interested:

Throwing ToolException when incorrect arguments are passed to tools so that that agent can course correct them.
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

thanks! great catch

@hwchase17 hwchase17 added the lgtm label Jun 3, 2023
@swappysh swappysh closed this Jun 8, 2023
@swappysh swappysh reopened this Jun 8, 2023
@swappysh
Copy link
Contributor Author

swappysh commented Jun 8, 2023

Looks ready to merge. @hwchase17 thanks! 🎉

@swappysh
Copy link
Contributor Author

swappysh commented Jun 8, 2023

Fixed the test error and formatted the code

@swappysh
Copy link
Contributor Author

@hwchase17 All checks passed, this can be merged.

@hwchase17 hwchase17 merged commit dc4ffa8 into langchain-ai:master Jun 20, 2023
tconkling added a commit to tconkling/langchain that referenced this pull request Jun 20, 2023
* master: (101 commits)
  add FunctionMessage support to `_convert_dict_to_message()` in OpenAI chat model (langchain-ai#6382)
  bump version to 206 (langchain-ai#6465)
  fix neo4j schema query (langchain-ai#6381)
  Update serpapi.py Support baidu list type answer_box (langchain-ai#6386)
  fix: llm caching for replicate (langchain-ai#6396)
  feat: use latest duckduckgo_search API to call (langchain-ai#6409)
  Harrison/unstructured page number (langchain-ai#6464)
  Improve error message (langchain-ai#6275)
  Fix the issue where ANTHROPIC_API_URL set in environment is not takin… (langchain-ai#6400)
  Fix broken links in autonomous agents docs (langchain-ai#6398)
  Update SinglStoreDB vectorstore (langchain-ai#6423)
  Fix for langchain-ai#6431 - chatprompt template with partial variables giing validation error (langchain-ai#6456)
  Harrison/functions in retrieval (langchain-ai#6463)
  Incorrect argument count handling (langchain-ai#5543)
  Fixed a link typo /-/route -> /-/routes. and change endpoint format (langchain-ai#6186)
  docs `retrievers` fixes (langchain-ai#6299)
  Update introduction.mdx (langchain-ai#6425)
  Fix Custom LLM Agent example (langchain-ai#6429)
  Remove backticks without clear purpose from docs (langchain-ai#6442)
  Update web_base.ipynb (langchain-ai#6430)
  ...
@swappysh swappysh deleted the patch-1 branch June 20, 2023 22:29
This was referenced Jun 25, 2023
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