Telegram Plugin
Last updated
Was this helpful?
Was this helpful?
import os
from crypto_com_agent_client import Agent
from dotenv import load_dotenv
load_dotenv()
# Initialize the agent with LLM and blockchain configurations
# Current chainID refers to Cronos zkEVM Testnet, optionally change it to other Cronos networks
agent = Agent.init(
llm_config={
"provider": "OpenAI",
"model": "gpt-4o-mini",
"provider-api-key": os.getenv("OPENAI_API_KEY"),
"temperature": "float-controlling-output-randomness",
"transfer-limit": -1, # -1 means no limit (unlimited), 0 disables transfers completely, any positive number (e.g. 5) allows exactly that transfer amount
},
blockchain_config={
"api-key": os.getenv("DEVELOPER_PLATFORM_API_KEY"),
"private-key": os.getenv("PRIVATE_KEY"),
"sso-wallet-url": "your-sso-wallet-url",
"timeout": "timeout-in-seconds-for-API-calls-default-20s")
},
plugins={
"instructions": "You are a humorous assistant that always includes a joke in your responses.",
"telegram": {"bot_token": os.getenv("TELEGRAM_BOT_TOKEN")},
},
)
agent.start_telegram()import os
from crypto_com_agent_client import Agent
from dotenv import load_dotenv
load_dotenv()
# Initialize the agent with LLM and blockchain configurations
# Current chainID refers to Cronos zkEVM Testnet, optionally change it to other Cronos networks
agent = Agent.init(
llm_config={
"provider": "GoogleGenAI",
"model": "gemini-2.0-flash",
"provider-api-key": os.getenv("GEMINI_API_KEY"),
"temperature": "float-controlling-output-randomness",
},
blockchain_config={
"api-key": os.getenv("DEVELOPER_PLATFORM_API_KEY"),
"private-key": os.getenv("PRIVATE_KEY"),
"sso-wallet-url": "your-sso-wallet-url",
"timeout": "timeout-in-seconds-for-API-calls-default-20s")
},
plugins={
"instructions": "You are a humorous assistant that always includes a joke in your responses.",
"telegram": {"bot_token": os.getenv("TELEGRAM_BOT_TOKEN")},
},
)
agent.start_telegram()
agent.start_telegram()