diff --git a/README.md b/README.md index 9f40b24..01632a5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ We provide 2 starter kits: 1. Uses `LangChain` 2. Uses OpenAI's `Swarm` framework -Both agents are equipped with Coinbase's [AgentKit](https://github.com/coinbase/cdp-agentkit) for making on-chain transactions as well as a Twitter toolbox for read and write access to X. +Both agents use OpenGradient's verifiable inference and on-chain ML tools for AI-powered workflows. ## Documentation diff --git a/langchain-starter/README.md b/langchain-starter/README.md index 8df817c..caae143 100644 --- a/langchain-starter/README.md +++ b/langchain-starter/README.md @@ -20,7 +20,7 @@ The agent is equipped by the following tools: 1. Dependencies are defined in `requirements.txt`, run `pip install -r requirements.txt` to install all dependencies. We recommend using virtualenv. 2. You'll need an OpenGradient token in order to run inferences. You can use the `opengradient` CLI to create it, read more on our [official docs](https://docs.opengradient.ai/developers/sdk/#credentials-setup). -3. Make a copy of the `.env.sh.template` file in the root folder and rename to `.env.sh`. Fill in with your OpenGradient token as well as Twitter API keys. +3. Make a copy of the `.env.sh.template` file in the root folder and rename to `.env.sh`. Fill in with your OpenGradient token. Note: If you run into git permission denied error messages, please generate a Github SSH key. ``` diff --git a/langchain-starter/agent.py b/langchain-starter/agent.py index ecdc87f..cc8141d 100644 --- a/langchain-starter/agent.py +++ b/langchain-starter/agent.py @@ -22,6 +22,6 @@ def create_agent_executor(): agent_executor = create_react_agent( model=llm, tools=create_agent_toolkit(), - messages_modifier=AGENT_SYSTEM_PROMPT) + state_modifier=AGENT_SYSTEM_PROMPT) return agent_executor \ No newline at end of file diff --git a/langchain-starter/tools.py b/langchain-starter/tools.py index 1ac3724..5097680 100644 --- a/langchain-starter/tools.py +++ b/langchain-starter/tools.py @@ -3,7 +3,7 @@ from langchain_community.tools import WikipediaQueryRun from langchain_community.utilities import WikipediaAPIWrapper from langchain_core.tools import BaseTool -from opengradient.mltools import create_og_model_tool, ToolType +from opengradient.alphasense import create_run_model_tool, ToolType # Define the tools the agent can use def create_agent_toolkit() -> List[BaseTool]: @@ -13,12 +13,12 @@ def create_agent_toolkit() -> List[BaseTool]: tools.append(wikipedia) # Add Spot Forecast model - tools.append(create_og_model_tool( + tools.append(create_run_model_tool( tool_type=ToolType.LANGCHAIN, model_cid="QmY1RjD3s4XPbSeKi5TqMwbxegumenZ49t2q7TrK7Xdga4", tool_name="SuiSpotForecast", - input_getter=lambda: {"open_high_low_close": fetch_sui_price_candles()}, - output_formatter=lambda out: f"The predicted price change is: {out['destandardized_prediction'][0] * 100}%", + model_input_provider=lambda: {"open_high_low_close": fetch_sui_price_candles()}, + model_output_formatter=lambda out: f"The predicted price change is: {out['destandardized_prediction'][0] * 100}%", tool_description="Runs an ML model to forecast the price of SUI 30 minutes from now. Requires no input." ))