devstein / langchain

⚡ Building applications with LLMs through composability ⚡
MIT License
1 stars 0 forks source link

How to pass multiple arguments to tool? #2

Open devstein opened 1 year ago

devstein commented 1 year ago

Issue you'd like to raise.

Hi I want to pass multiple arguments to a tool, that was created using @tool decorator. E.g.

@tool
def test(query: str, smth: str) -> str:
  """description"""
   return "test"

tools = [
   lambda query, smth: test(query, smth)
]

initialize_agent(tools...)

I'm getting an error. In the example in the docs , it is shown that agent decides what to pass, but I don't want such a behavior, I want ability to pass arguments myself along with a query.

Suggestion:

No response