Files
langchain-python/langchain
Swapnil Sharma dc4ffa8d9b Incorrect argument count handling (#5543)
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

<!-- If you're adding a new integration, please include:

1. a test for the integration - favor unit tests that does not rely on
network access.
2. an example notebook showing its use


See contribution guidelines for more information on how to write tests,
lint
etc:


https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
-->

## Who can review?

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

<!-- For a quicker response, figure out the right person to tag with @

  @hwchase17 - project lead

  Tracing / Callbacks
  - @agola11

  Async
  - @agola11

  DataLoaders
  - @eyurtsev

  Models
  - @hwchase17
  - @agola11

  Agents / Tools / Toolkits
  - @vowelparrot

  VectorStores / Retrievers / Memory
  - @dev2049

 -->

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-06-19 22:06:20 -07:00
..
2023-06-19 17:18:54 -07:00
2023-06-19 18:31:38 -07:00
2023-06-18 16:55:18 -07:00
2023-06-16 11:52:56 -07:00
2023-06-18 22:49:47 -07:00
2023-06-18 16:55:18 -07:00
2023-05-17 01:28:43 +00:00
2023-06-11 15:51:28 -07:00
2023-06-08 21:15:14 -07:00
2023-06-03 16:48:48 -07:00
2022-11-12 11:22:32 -08:00
2023-06-18 22:49:47 -07:00
2023-02-20 21:15:45 -08:00