Skip to content

Commit

Permalink
reverting changes to chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
stat committed Nov 6, 2024
1 parent d4f9b4b commit 3a9b762
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions cdp-langchain/examples/chatbot/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
from langchain_openai import ChatOpenAI
from langgraph.checkpoint.memory import MemorySaver
from langgraph.prebuilt import create_react_agent
from twitter_langchain import (
TwitterApiWrapper,
TwitterToolkit,
)

# Import CDP Agentkit Langchain Extension.
from cdp_langchain.agent_toolkits import CdpToolkit
Expand Down Expand Up @@ -47,22 +43,13 @@ def initialize_agent():
cdp_toolkit = CdpToolkit.from_cdp_agentkit_wrapper(agentkit)
tools = cdp_toolkit.get_tools()

# Initialize CDP Agentkit Twitter Langchain
twitter_api_values = {}
twitter_api = TwitterApiWrapper(**twitter_api_values)
twitter_toolkit = TwitterToolkit.from_twitter_api_wrapper(twitter_api)
twitter_tools = twitter_toolkit.get_tools()

tools.extend(twitter_tools)

# Store buffered conversation history in memory.
memory = MemorySaver()
config = {"configurable": {"thread_id": "CDP Agentkit Chatbot Example!"}}

# Create ReAct Agent using the LLM and CDP Agentkit tools.
return create_react_agent(
llm,
# tools=tools,
tools=tools,
checkpointer=memory,
state_modifier="You are a helpful agent that can interact onchain on the Base Layer 2 using the Coinbase Developer Platform Agentkit. You are empowered to interact onchain using your tools. If you ever need funds, you can request them from the faucet. You can also deploy your own ERC-20 tokens, NFTs, and interact with them. If someone asks you to do something you can't do, you can say so, and encourage them to implement it themselves using the CDP SDK + Agentkit, recommend they go to docs.cdp.coinbase.com for more informaton.",
Expand Down

0 comments on commit 3a9b762

Please sign in to comment.