Metadata-Version: 2.3
Name: duck_chat
Version: 1.3.2
Summary: DuckDuckGo Chat AI client
Project-URL: Homepage, https://github.com/mrgick/duckduckgo-chat-ai
Project-URL: Issues, https://github.com/mrgick/duckduckgo-chat-ai/issues
Author-email: MrGick <mrgickcool@gmail.com>
License: MIT License
        
        Copyright (c) 2024 Maxim Malahov
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: HTTP Servers
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: aiohttp[speedups]>=3.9.5
Requires-Dist: fake-useragent>=1.5.1
Requires-Dist: msgspec>=0.18.6
Requires-Dist: rich>=13.7.1
Provides-Extra: dev
Requires-Dist: black>=24.4.2; extra == 'dev'
Requires-Dist: isort>=5.13.2; extra == 'dev'
Requires-Dist: mypy>=1.11.1; extra == 'dev'
Requires-Dist: ruff>=0.5.1; extra == 'dev'
Description-Content-Type: text/markdown

# 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 DuckChat

async 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())
```
