A Python client for the DuckDuckGo Chat API to send messages and receive responses asynchronously. With this .ipynb file, you can use GPT-4o mini, Claude 3 Haiku, Llama 3.1 70B, Mixtral 8x7B for free.
- Inspired from mumu-lhl/duckduckgo-ai-chat
- Python 3.7+
httpx
library
Available AI models:
GPT_4O_MINI
CLAUDE_3_HAIKU
META_LLAMA
MISTRALAI
chat_instance = await init_chat(Model.GPT_4O_MINI)
response = await chat_instance.fetch_full("Merhaba. Nasıl gidiyor?")
print(response)
chat_instance = await init_chat(Model.CLAUDE_3_HAIKU)
response = await chat_instance.fetch_full("Merhaba. Nasıl gidiyor?")
print(response)
chat_instance = await init_chat(Model.META_LLAMA)
response = await chat_instance.fetch_full("Merhaba. Nasıl gidiyor?")
print(response)
chat_instance = await init_chat(Model.MISTRALAI)
response = await chat_instance.fetch_full("Merhaba. Nasıl gidiyor?")
print(response)