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

core[patch]: return ToolMessage from tool #28605

Merged
merged 9 commits into from
Dec 10, 2024

Conversation

baskaryan
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Dec 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Dec 10, 2024 9:57am

@baskaryan baskaryan marked this pull request as ready for review December 10, 2024 02:38
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. langchain Related to the langchain package labels Dec 10, 2024
@@ -954,10 +972,31 @@ class InjectedToolArg:
"""Annotation for a Tool arg that is **not** meant to be generated by a model."""


def _is_injected_arg_type(type_: type) -> bool:
class InjectedToolCallId(InjectedToolArg):
Copy link
Contributor

Choose a reason for hiding this comment

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

could we export this one from langchain_core.tools?

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 10, 2024
@@ -9,7 +9,11 @@
from langchain_core.utils._merge import merge_dicts, merge_obj


class ToolMessage(BaseMessage):
class ToolOutputMixin:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you define what returning directly means in the doc-string?

@baskaryan baskaryan enabled auto-merge (squash) December 10, 2024 09:57
@baskaryan baskaryan merged commit e24f86e into master Dec 10, 2024
81 checks passed
@baskaryan baskaryan deleted the bagatur/rfc_tool_return_tool_msg branch December 10, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
langchain Related to the langchain package lgtm PR looks good. Use to confirm that a PR is ready for merging. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants