This example demonstrates how to use the Deep.Assistant API with Python and the OpenAI SDK.
-
Copy the example environment file and configure your API credentials:
cp .env.example .env
Then edit
.envwith your API credentials:OPENAI_API_KEY=YOUR_TOKEN_HERE OPENAI_API_BASE=https://api.deep.assistant.run.place/v1
-
Install dependencies:
pip install -r requirements.txt
python example.py
# or
python3 example.pyThe example uses:
openai- OpenAI Python SDKpython-dotenv- Environment variable loading from .env file- Standard OpenAI environment variables (
OPENAI_API_KEY,OPENAI_BASE_URL,OPENAI_API_BASE)
Get your API key from the Telegram bot: https://t.me/DeepGPTBot
Use the /api command to obtain your key.