This example demonstrates how to use the Deep.Assistant API with JavaScript/Node.js 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:
npm install
npm start
# or
node example.jsThe example uses:
openai- OpenAI JavaScript SDKdotenv- 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.