Using Crypto.com AI Agent with Gemini
A guide to using the Crypto.com AI Agent with Google's Gemini model for blockchain interactions.
Last updated
Was this helpful?
A guide to using the Crypto.com AI Agent with Google's Gemini model for blockchain interactions.
Last updated
Was this helpful?
Start by cloning the repository and navigating to the appropriate directory, and install the dependencies:
# Clone the repository
git clone git@github.com:crypto-com/developer-platform-sdk-examples.git
cd developer-platform-sdk-examples/ai/cryptocom-ai-agent-pychatbot
# Install dependencies
pip install -r requirements.txt
Direct to Env
and set up the following API keys in your environment:
OPENAI_API_KEY
- For OpenAI functionality
GOOGLE_API_KEY
- For Gemini functionality
GOOGLE_PROJECT_ID
- For Gemini functionality
python chat.py
When prompted, select gemini
as your AI provider.
curl -X POST http://localhost:8000/api/v1/cdc-ai-agent-service/query \
-H "Content-Type: application/json" \
-d '{
"query": "get latest block",
"options": {
"gemini": {
"apiKey": "YOUR_GOOGLE_API_KEY"
},
"llmProvider": "gemini",
"context": []
}
}'
curl -X POST http://localhost:8000/api/v1/cdc-ai-agent-service/query \
-H "Content-Type: application/json" \
-d '{
"query": "get latest block",
"options": {
"openAI": {
"apiKey": "YOUR_OPENAI_API_KEY"
},
"llmProvider": "openai",
"context": []
}
}'