mrgick / duck_chat

Reverse engineered DuckDuckGo AI chat API client.
https://pypi.org/project/duck-chat/
MIT License
38 stars 9 forks source link

Changing the model interactively #4

Open mrgick opened 4 months ago

mrgick commented 4 months ago

Add a command /model to change model Send all history in first prompt to new model

Maybe a `/model name´ could be nice, but I don't think it's possible because DDG is cleaning the conversation when changing the model.

/model can only be implemented with clearing the chat, though... We could collect the conversation history into one first prompt and send it into a new model

idea from PR#3

Jonas004 commented 1 month ago

First off all: nice work. The Python package is amazingly simple to use. Unfortunately you can't switch the used model. In model/model_type.py there are four models listed. Is there a reason why in api.py Line 19 the ModelType is set to ModelType.Claude?

Jonas004 commented 1 month ago

For anyone who is also interesed. You can change the AI model used by the python package by changing the Model in the source code and installing the package from source:

  1. pip uninstall duck-chat
  2. Download the source code from github, open duck_chat/api.py and replace Claude in Line 19 with your choice of model. All possible models are listed in duck_chat/models/model_type.py. Curently there are:
  1. Save and install the edited package by pip install -U .