Commit
·
578e0c9
1
Parent(s):
769f578
Add Docker setup instructions to README
Browse files
README.md
CHANGED
|
@@ -2,6 +2,63 @@
|
|
| 2 |
|
| 3 |
A high-performance OpenAI-compatible HTTP server that uses DuckDuckGo's AI backend, providing free access to multiple AI models through the familiar OpenAI API interface.
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
## Introduction
|
| 6 |
|
| 7 |
DuckAI OpenAI Server bridges the gap between DuckDuckGo's free AI chat service and the widely-adopted OpenAI API format. This allows you to:
|
|
@@ -10,7 +67,7 @@ DuckAI OpenAI Server bridges the gap between DuckDuckGo's free AI chat service a
|
|
| 10 |
- **Drop-in OpenAI replacement** - Compatible with existing OpenAI client libraries
|
| 11 |
- **Tool calling support** - Full function calling capabilities
|
| 12 |
- **Streaming responses** - Real-time response streaming
|
| 13 |
-
-
|
| 14 |
|
| 15 |
### Supported Models
|
| 16 |
|
|
|
|
| 2 |
|
| 3 |
A high-performance OpenAI-compatible HTTP server that uses DuckDuckGo's AI backend, providing free access to multiple AI models through the familiar OpenAI API interface.
|
| 4 |
|
| 5 |
+
## Setup & Quick Start
|
| 6 |
+
|
| 7 |
+
### Option 1: Using Docker (Recommended)
|
| 8 |
+
|
| 9 |
+
The easiest way to get started is using the pre-built Docker image:
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
# Pull the Docker image
|
| 13 |
+
docker pull amirkabiri/duckai
|
| 14 |
+
|
| 15 |
+
# Run the container
|
| 16 |
+
docker run -p 3000:3000 amirkabiri/duckai
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
The server will be available at `http://localhost:3000`.
|
| 20 |
+
|
| 21 |
+
Docker image URL: [https://hub.docker.com/r/amirkabiri/duckai/](https://hub.docker.com/r/amirkabiri/duckai/)
|
| 22 |
+
|
| 23 |
+
### Option 2: Manual Setup
|
| 24 |
+
|
| 25 |
+
1. Clone the repository:
|
| 26 |
+
```bash
|
| 27 |
+
git clone git@github.com:amirkabiri/duckai.git
|
| 28 |
+
cd duckai
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
2. Install dependencies:
|
| 32 |
+
```bash
|
| 33 |
+
bun install
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
3. Start the server:
|
| 37 |
+
```bash
|
| 38 |
+
bun run dev
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
### Basic Usage Example
|
| 42 |
+
|
| 43 |
+
```javascript
|
| 44 |
+
import OpenAI from "openai";
|
| 45 |
+
|
| 46 |
+
const openai = new OpenAI({
|
| 47 |
+
baseURL: "http://localhost:3000/v1",
|
| 48 |
+
apiKey: "dummy-key", // Any string works
|
| 49 |
+
});
|
| 50 |
+
|
| 51 |
+
// Chat completion
|
| 52 |
+
const completion = await openai.chat.completions.create({
|
| 53 |
+
model: "gpt-4o-mini", // Default model
|
| 54 |
+
messages: [
|
| 55 |
+
{ role: "user", content: "Hello! How are you?" }
|
| 56 |
+
],
|
| 57 |
+
});
|
| 58 |
+
|
| 59 |
+
console.log(completion.choices[0].message.content);
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
## Introduction
|
| 63 |
|
| 64 |
DuckAI OpenAI Server bridges the gap between DuckDuckGo's free AI chat service and the widely-adopted OpenAI API format. This allows you to:
|
|
|
|
| 67 |
- **Drop-in OpenAI replacement** - Compatible with existing OpenAI client libraries
|
| 68 |
- **Tool calling support** - Full function calling capabilities
|
| 69 |
- **Streaming responses** - Real-time response streaming
|
| 70 |
+
- ✅ Rate limiting - Built-in intelligent rate limiting to respect DuckDuckGo's limits
|
| 71 |
|
| 72 |
### Supported Models
|
| 73 |
|