-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Feature: plugin/tools with input params #753
Comments
Hello there, thank you for opening an Issue ! 🙏🏻 The team was notified and they will get back to you asap. |
@autonomous-spores the agent will automatically fill in the parameters of the function ;) The agent will make the input of all the input to the function. |
@autonomous-spores you essentially just put the name of the function into the tools parameter: tools = [name_of_tool] |
emm, i mean i wanna access the fields of the object. for instance, i got answer "London" from conversations with LLM. but i wanna now how's the weather in Westminster which is central London. "London" is a string from LL's replies without access to its sub-fields. tools = [get_current_weather] call: I expect London is an object that allows me to access 'Westminster' get_current_weather(london(object).westminster) |
@autonomous-spores you would tell the agent to search the weather in westminister, and it would then search the weather for that city in natural language. The agent will fill in the input parameters of the function, you can set a default parameter however, search_weather( city: str = "westminister" ) |
London is the object, as we defined and structured it in code, in the context of runtime. occasionally, i need to access some fields within the object in runtime instead of obtaining "string" answer in natural language from LLM. |
@autonomous-spores fix this now. |
Figure 1 illustrates the method for defining tools within swarms(line 47), utilizing an 'array' to dynamically load functions, such as fetch_current_weather. Below is a pseudocode example demonstrating a function with input parameters:
The tools function by sending prompts, generated based on the annotations in the function above, to the agent to determine if the conversation between the LLM and the user includes a query about the weather.
For instance, consider the query, "How’s the weather in London today?" The program is expected to have "London" as the input and process it based on the LLM's response.
When implementing plugins in practice, it is essential to execute them with context-specific inputs, as demonstrated below. Ideally, we aim for the fetch_current_weather function to operate with a payload that accommodates variations.
https://github.com/spore-swarm/autonomous-spores/blob/main/spores/core/runtime.py#L46
In the spores-swarm repository(we are building runtime module right now), we want it to be as shown in this link rather than as written at line 47.
kindly ask any ideas for this feature? or is there any alternative ways to get there, or will be featured in future?
The text was updated successfully, but these errors were encountered: