Chatbot
A streaming chatbot built with the Bitdeer AI chat completion API.
A minimal streaming chatbot that exercises authentication, streaming, and error handling.
Python implementation
JavaScript implementation
Key points
- Streaming uses
stream: true— tokens arrive incrementally via SSE. - Conversation history is maintained by appending messages to the array.
- Error handling — wrap in try/catch and handle
RateLimitErrorwith exponential backoff.
Last updated on