https://github.com/mumu-lhl/duckduckgo-ai-chat
Providing Duckduckgo AI Chat API, which can use o3-mini for free.
https://github.com/mumu-lhl/duckduckgo-ai-chat
ai api chatbot chatgpt claude-3 claude-3-haiku duckduckgo gpt gpt-4o-mini javascript library llama llama3 o3-mini openai-api typescript
Last synced: 28 days ago
JSON representation
Providing Duckduckgo AI Chat API, which can use o3-mini for free.
- Host: GitHub
- URL: https://github.com/mumu-lhl/duckduckgo-ai-chat
- Owner: mumu-lhl
- License: mit
- Created: 2024-07-31T07:58:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-26T03:15:46.000Z (6 months ago)
- Last Synced: 2025-09-04T04:44:19.383Z (about 1 month ago)
- Topics: ai, api, chatbot, chatgpt, claude-3, claude-3-haiku, duckduckgo, gpt, gpt-4o-mini, javascript, library, llama, llama3, o3-mini, openai-api, typescript
- Language: TypeScript
- Homepage: https://jsr.io/@mumulhl/duckduckgo-ai-chat
- Size: 36.1 KB
- Stars: 93
- Watchers: 1
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno - duckduckgo-ai-chat - Providing Duckduckgo AI Chat API, which can use gpt-4o-mini for free. (Modules / LLM)
README
# duckduckgo-ai-chat

English | [中文](./README_CN.md)
duckduckgo-ai-chat provides the [Duckduckgo AI Chat](https://duckduckgo.com/aichat) API for JavaScript/TypeScript, which can use o3-mini for free.
## Notice
**Duckduckgo has made cracking much harder, and I am unable to maintain this project.**
## Install
```sh
npx jsr add @mumulhl/duckduckgo-ai-chat
# or
pnpm dlx jsr add @mumulhl/duckduckgo-ai-chat
# or
yarn dlx jsr add @mumulhl/duckduckgo-ai-chat
# or
deno add jsr:@mumulhl/duckduckgo-ai-chat
```## Usage example
```javascript
import { initChat } from "@mumulhl/duckduckgo-ai-chat";// Initialize, optional models are gpt-4o-mini, claude-3-haiku, llama, mixtral, o3-mini
const chat = await initChat("o3-mini");// Fetch the full reply in one go
let message = await chat.fetchFull("Hello");
console.log(message)// Redo
chat.redo()
message = await chat.fetchFull("Hello");
console.log(message)// Fetch the streamed reply
const stream = chat.fetchStream("Hello");
for await (let data of stream) {
console.log(data)
}
```## Star History
Poor star count...
[](https://star-history.com/#mumu-lhl/duckduckgo-ai-chat&Date)