-
Notifications
You must be signed in to change notification settings - Fork 15.7k
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
Cannot inspect schema when working with special type annotations #27510
Comments
Hey @eyurtsev! We are a group of students from UofT interested in this issue. Is it possible we could know more details of this issue and the desire output? |
A tool is an association between:
There are use cases, where some of the tools inputs should not be controllable by the chat model, but dictated by the application logic. (e.g., We use special type annotations to mark arguments as "hidden" from the chat model. This allows us to use the FYI I haven't triaged this issue yet to determine whether it manifests itself when used with chat models (there might be another code path used) -- i don't know if this is a high priority issue yet or not, if it's high priority we will likely tackle within a few days time |
hey @eyurtsev, To confirm our understanding of the issue: The goal is that when we use: from langchain_core.tools import tool, InjectedToolArg
@tool
def user_specific_tool(input_data: str, user_id: InjectedToolArg) -> str:
"""Some tool"""
return f"User {user_id} processed {input_data}" The schema generated by Additionally, if we define: def call_tool(input_data: str, user_id: str):
return user_specific_tool.run({"input_data": input_data}, user_id=user_id)
result = call_tool("some data", "12345")
print(result) The expected output should be:
Loop in team members @Chloekyuu @JANERUBBISHTOEAT @XiaoConan |
Our team has determined that modifying the ccing team: @chloepan33 @Chloekyuu @XiaoConan |
Hi @eyurtsev, Our team had identified that the issue arises because the
To address these issues, we propose the following solutions:
We created a PR here: #28435 Here's a testing file to observe the actual behavior:
Loop in team members @Chloekyuu @JANERUBBISHTOEAT @chloepan33 |
Privileged issue
Issue Content
schema inspection + special type annotations
The text was updated successfully, but these errors were encountered: