https://github.com/mrgick/duck_chat
Reverse engineered DuckDuckGo AI chat API client.
https://github.com/mrgick/duck_chat
ai-chat duckduckgo duckduckgo-ai duckduckgo-chat python
Last synced: 5 months ago
JSON representation
Reverse engineered DuckDuckGo AI chat API client.
- Host: GitHub
- URL: https://github.com/mrgick/duck_chat
- Owner: mrgick
- License: mit
- Created: 2024-07-06T19:45:22.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-08-21T16:04:06.000Z (8 months ago)
- Last Synced: 2024-11-05T21:39:42.334Z (6 months ago)
- Topics: ai-chat, duckduckgo, duckduckgo-ai, duckduckgo-chat, python
- Language: Python
- Homepage: https://pypi.org/project/duck-chat/
- Size: 72.3 KB
- Stars: 35
- Watchers: 4
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A DuckDuckGo AI chat client written in python
A python-implemented DuckDuckGo AI chat client with model selection and dialog history during usage.
> Based on the ideas of [duck-hey](https://github.com/b1ek/hey)
## Disclaimer
By using this client you accept [DuckDuckGo AI Chat ToS](https://duckduckgo.com/aichat/privacy-terms)## Installation
1. Install [python 3.12](https://www.python.org/downloads/)2. Create python venv (optionally)
```bash
python -m venv .venv && source .venv/bin/activate
```3. Install package
- Install auto
```bash
pip install -U https://github.com/mrgick/duckduckgo-chat-ai/archive/master.zip
```
- Install manually
1. Clone repo```bash
git clone https://github.com/mrgick/duckduckgo-chat-ai.git && cd duckduckgo-chat-ai
```
2. Install package```bash
pip install -U .
```## Usage
- Using terminal
```bash
python -m duck_chat
```
or
```
duck_chat
```> P.S. You can use hey config ```".config/hey/conf.toml"``` Thanks [k-aito](https://github.com/mrgick/duckduckgo-chat-ai/pull/1)
- Using as library
```py
import asyncio
from duck_chat import DuckChatasync def main():
async with DuckChat() as chat:
print(await chat.ask_question("2+2?"))
await asyncio.sleep(1)
print(await chat.ask_question("6+6?"))asyncio.run(main())
```