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

Separate tools from agent code. #75

Open
svange opened this issue Oct 6, 2023 · 0 comments
Open

Separate tools from agent code. #75

svange opened this issue Oct 6, 2023 · 0 comments
Assignees

Comments

@svange
Copy link
Owner

svange commented Oct 6, 2023

Description

The user should be able to specify a set of tools or even have custom tools not provided in our codebase. Currently, due to the nature of the namespaces involved, the "contact human agent" tool does all of it's productive work in the langchain callback manager. This tightly couples the agents with their tools and it's this coupling that needs to be broken.

Possible Solution

Perhaps deviating away from the langchain Pydantic style of defining agent function definitions, but I'd like to explore other options that allow us to take advantage of Pydantic's serialization/deserialization, and langchains clean integration with Pydantic.

Additional context

Near the top of gpt_agent.py you can see a langchain callback manager that contains all of the logic for the "call a human agent" tool. This is there because we don't want the agent to have to be "aware" of any metadata like session_id or client_id. It should just be able to invoke a tool with information from the conversation.

In order to get around this, more complicated objects for comparisons are passed along in the callback manager, and the tool function only serves to define the fields of an incoming object (which is then used to populate an ORM object with metadata).

Additional context

No response

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

No branches or pull requests

1 participant