Powered by an UR3e, LLMs, and questionable brilliance, this system takes your human ramblings, converts them into robotic commands.
- Clone the repo.
- Create a
.env
file in the project root with the following keys:
OPENAI_API_KEY=<your_openai_api_key>
TAVILY_API_KEY=<your_tavily_api_key>
HOST=<robot_host_ip>
PORT=<robot_port>
- Install the required Python packages:
pip install -r requirements.txt
- Run the main file:
py main.py
- Say random stuff and let Yochad work its magic.
-
Write a Function
- Create a Python function for your tool logic.
-
Add a Docstring
- Include a detailed docstring describing:
- What the tool does.
- Arguments the tool takes and their types.
- Return values, if any.
- Include a detailed docstring describing:
-
Wrap with
@tool
- Add
@tool
above the function definition to register it as a tool.
- Add
-
Example
Here’s an example of a simple tool that multiplies two numbers:@tool def multiply_numbers(a, b): """ Multiplies two numbers. Args: a (int or float): The first number. b (int or float): The second number. Returns: int or float: The product of the two numbers. """ return a * b
-
Add the Tool to the Agent's Tool List
- Integrate your new tool into the agent's list of tools.
- Replace the existing tool list items with your custom tools as needed.
tools = [ tool1, tool2, tool3, # Add your custom tool multiply_numbers, ]
-
Test the Tool
- Integrate and Test: Add the tool to Yochad and invoke it using commands to confirm it's functioning correctly.