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

rfc: callback changes #1165

Merged
merged 4 commits into from
Feb 21, 2023
Merged

rfc: callback changes #1165

merged 4 commits into from
Feb 21, 2023

Conversation

hwchase17
Copy link
Contributor

conceptually, no reason a tool should know what an "agent action" is

unless any objections, can change in all callback handlers

@hwchase17 hwchase17 requested a review from agola11 February 20, 2023 03:28
Copy link
Collaborator

@agola11 agola11 left a comment

Choose a reason for hiding this comment

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

Nice, yeah agentaction did not need to be part of the tool callbacks

action=action.tool,
tool_input=action.tool_input,
# TODO: this is duplicate info as above, not needed.
action=str(serialized),
Copy link
Collaborator

@agola11 agola11 Feb 21, 2023

Choose a reason for hiding this comment

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

I can rm this from the tracing backend and make the changes here next time we release a new tracing version

@@ -68,7 +68,7 @@ def on_chain_error(

@abstractmethod
def on_tool_start(
self, serialized: Dict[str, Any], action: AgentAction, **kwargs: Any
self, serialized: Dict[str, Any], input_str: str, **kwargs: Any
Copy link
Collaborator

Choose a reason for hiding this comment

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

uber nit: tool_input seems like a better name?

@hwchase17 hwchase17 merged commit b7708bb into master Feb 21, 2023
@hwchase17 hwchase17 deleted the harrison/callback-fix branch February 21, 2023 06:54
@blob42 blob42 mentioned this pull request Feb 21, 2023
zachschillaci27 pushed a commit to zachschillaci27/langchain that referenced this pull request Mar 8, 2023
conceptually, no reason a tool should know what an "agent action" is

unless any objections, can change in all callback handlers
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