CLI to use DuckDuckGo AI Chat service from terminal
Project description
duckduckgo-ai-chat
CLI to use DuckDuckGo AI Chat service from terminal
Based on the ideas of duckduckGO-chat-cli
Usage
For help, run:
duckchat --help
You can also use:
python -m duckchat --help
This produces.
usage: duckchat [-h] [-m {1,2,3,4,5}] [-y] [-q QUERY]
CLI to use DuckDuckGo AI Chat service from terminal
optional arguments:
-h, --help show this help message and exit
-m {1,2,3,4,5}, --model {1,2,3,4,5}
Select a model by key:
1: gpt-4o-mini
2: claude-3-haiku-20240307
3: meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo
4: mistralai/Mistral-Small-24B-Instruct-2501
5: o3-mini
-y, --yes If provided, means user accept terms of service.
-q QUERY, --query QUERY
First query to submit to the model
Using duckchat with initial Query
Now we can pass initial context when invoking a model with duckchat
cat app.py | duckchat --yes --model 4 --query "Explain this code"
or launch a model with an initial query
duckchat -y -m 4 -q "How to use pytest-vcr?"
Using Duckchat with uv
Use duckchat without installing with uv
uv run --with duckduckgo-ai-chat duckchat
Saving conversations in duckchat
Now user can save their conversaions using the /save command within the duckchat interface.
And the saved file looks like this
Available Models
| Model Name | Actual Model | Performance | Recommended Usage | Characteristics |
|---|---|---|---|---|
| GPT-4o mini | gpt-4o-mini | Fast | Quick, simple tasks | Default model, Versatile |
| Claude 3 Haiku | claude-3-haiku-20240307 | Balanced | Technical discussions | Good context handling, Structured responses |
| Llama 3.3 70B | meta-llama/Llama-3.3-70B-Instruct-Turbo | Code optimized | Programming tasks | Documentation analysis, Code generation |
| Mistral Small 3 | mistralai/Mistral-Small-24B-Instruct-2501 | Knowledge focused | Complex topics | Detailed explanations, In-depth analysis |
| o3-mini | o3-mini | Very fast | Simple queries | Lightweight, Quick responses |
Installation
Install this tool using pip:
pip install duckduckgo-ai-chat
Development
To contribute to this tool, first checkout the code. Then create a new virtual environment:
cd duckduckgo-ai-chat
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
python -m pytest
Disclaimer
By using this client you accept DuckDuckGo AI Chat ToS
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file duckduckgo_ai_chat-0.0.8.tar.gz.
File metadata
- Download URL: duckduckgo_ai_chat-0.0.8.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbb799bf1a565b7e8c850aed8edade7936ed62e38a4a0051a4ffed72ca03c937
|
|
| MD5 |
4d04a99497935397e7eba60ee7920045
|
|
| BLAKE2b-256 |
a3b928c9574487b774a7c7b45b74bea037fe9fedcf08e3ecee4888b87909bdf6
|
Provenance
The following attestation bundles were made for duckduckgo_ai_chat-0.0.8.tar.gz:
Publisher:
publish.yml on sukhbinder/duckduckgo-ai-chat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duckduckgo_ai_chat-0.0.8.tar.gz -
Subject digest:
cbb799bf1a565b7e8c850aed8edade7936ed62e38a4a0051a4ffed72ca03c937 - Sigstore transparency entry: 189228924
- Sigstore integration time:
-
Permalink:
sukhbinder/duckduckgo-ai-chat@68bee06644cff344be1a0b4e9ac96415e9b27208 -
Branch / Tag:
refs/tags/v0.0.8a - Owner: https://github.com/sukhbinder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@68bee06644cff344be1a0b4e9ac96415e9b27208 -
Trigger Event:
release
-
Statement type:
File details
Details for the file duckduckgo_ai_chat-0.0.8-py3-none-any.whl.
File metadata
- Download URL: duckduckgo_ai_chat-0.0.8-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6104fba5932d964c1208ef8d5084bba4d7d732a3b98c0afd090f9e14a7678ba4
|
|
| MD5 |
186b974191568597c7e2c8b273dd9e21
|
|
| BLAKE2b-256 |
2df83cb847c6f8777881e694942246c23bcd920d60afe2543107d6ce5d13b49f
|
Provenance
The following attestation bundles were made for duckduckgo_ai_chat-0.0.8-py3-none-any.whl:
Publisher:
publish.yml on sukhbinder/duckduckgo-ai-chat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
duckduckgo_ai_chat-0.0.8-py3-none-any.whl -
Subject digest:
6104fba5932d964c1208ef8d5084bba4d7d732a3b98c0afd090f9e14a7678ba4 - Sigstore transparency entry: 189228925
- Sigstore integration time:
-
Permalink:
sukhbinder/duckduckgo-ai-chat@68bee06644cff344be1a0b4e9ac96415e9b27208 -
Branch / Tag:
refs/tags/v0.0.8a - Owner: https://github.com/sukhbinder
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@68bee06644cff344be1a0b4e9ac96415e9b27208 -
Trigger Event:
release
-
Statement type: