Skip to content

Reverse engineered DuckDuckGo AI chat API client.

License

Notifications You must be signed in to change notification settings

k-aito/duckduckgo-chat-ai

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Disclaimer

By using this client you accept DuckDuckGo AI Chat ToS

Installation

  1. Install python 3.12

  2. Create python venv (optionally)

python -m venv .venv && source .venv/bin/activate
  1. Install package

    • Install auto
    pip install -U https://github.com/mrgick/duckduckgo-chat-ai/archive/master.zip
    • Install manually

      1. Clone repo
      git clone https://github.com/mrgick/duckduckgo-chat-ai.git && cd duckduckgo-chat-ai
      1. Install package
      pip install -U .

Usage

  • Using terminal
python -m duck_chat

or

duck_chat

P.S. You can use hey config ".config/hey/conf.toml" Thanks k-aito

  • Using as library
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())

About

Reverse engineered DuckDuckGo AI chat API client.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%