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

Agents and tools #86

Merged
merged 4 commits into from
Jul 3, 2023
Merged

Agents and tools #86

merged 4 commits into from
Jul 3, 2023

Conversation

kreneskyp
Copy link
Owner

Description

This PR adds initial support for LangChain Agents and Tools. Both may be added to chains in the UX.

image
image

Agents included:

  • OPENAI_FUNCTIONS_AGENT
  • OPENAI_MULTIFUNCTION_AGENT
  • ZERO_SHOT_REACT_DESCRIPTION_AGENT
  • REACT_DOCSTORE_AGENT
  • SELF_ASK_WITH_SEARCH_AGENT
  • CONVERSATIONAL_REACT_DESCRIPTION_AGENT
  • CHAT_ZERO_SHOT_REACT_DESCRIPTION_AGENT
  • CHAT_CONVERSATIONAL_REACT_DESCRIPTION_AGENT
  • STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION_AGENT

Tools:

  • Google search
  • Wolfram search

Changes

How Tested

  • New unittests
  • Manual testing

TODOs

For follow up:

  • initialize_agent does not support FunctionSchema.
  • This PR has a very limited set of tools. I'm partially done importing most tools provided by LangChain. Subsequent PRs will add more tools.
  • intialize_agent does not support for loading ToolKits
  • Agents nodes can be connected to other agents and chains but they aren't executing in sequence.

- Agents can connect where chains are expected
- toned down dark mode agent highlight
- Agent configured to use ChainNode since AgentExecutor is a Chain
- Added initializer auto-generator to integrate all agents referenced by AgentType.
- Agent initializers handle kwarg repacking and integrating chat output.
- Added tool loading kwargs to simplify tool loading functions
- Added loader shims and NodeType definitions for google and wolfram
- Added AgentReply wrapper to handle output from Agents until callbacks are done.
@kreneskyp kreneskyp merged commit dbe2471 into master Jul 3, 2023
@kreneskyp kreneskyp deleted the agents_and_tools branch July 3, 2023 03:15
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