- run
pip install cdp-langchain
- setup environment variables.
export CDP_API_KEY_NAME="your-cdp-key-name"
export CDP_API_KEY_PRIVATE_KEY=$'your_cdp_private_key' # Remember to add the $ before the key and surround it with single quotes.
export OPENAI_API_KEY="your_openai_key"
export NETWORK_ID="base-sepolia" # Optional, defaults to base-sepolia
- ensure your openai platform api key has money in it.
- run generate_jwt_doordash.py to generate a JWT for doordash api
- save it to your .env file as
DOORDASH_JWT = <JWT>
- save the
DOORDASH_SIGNING_SECRET
,DOORDASH_DEVELOPER_ID
,DOORDASH_KEY_ID
, to .env file. - run
python chatbot.py
- Get an ngrok account here https://ngrok.com/
- in terminal 1, run
ngrok http <available port #>
- copy ngrok's forwarding URL, i.e.
https://abcd1234.ngrok-free.app
- in terminal 2, run curl -X POST "https://api.telegram.org/bot7823163314:AAGi3LZ0zFvBvtVauTPtWbcJoLQfQrQfhH0/setWebhook" -d "url=<step 2 URL>/webhook"
- check that this succeeded,
curl -X POST "https://api.telegram.org/bot7823163314:AAGi3LZ0zFvBvtVauTPtWbcJoLQfQrQfhH0/getWebhookInfo"
- in the response, see that the url is like
https://abcd1234.ngrok-free.app/webhook
- in telegrambot.py, update WEBHOOKS_URL to be step 5 url, and REDIRECT_URI to be like
<step 2 URL>/oauth/callback
- in Coinbase's developer dashboard, update the OAuth redirect URI to be like "<step 2 URL>/oauth/callback"
- in terminal 3, run
python telegrambot.py