Skip to content

Commit

Permalink
chat: update "llama-3-70b" to "llama-3.1-70b"
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Aug 14, 2024
1 parent 04987ef commit 17146e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions duckduckgo_search/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def version():
prompt="""DuckDuckGo AI chat. Choose a model:
[1]: gpt-4o-mini
[2]: claude-3-haiku
[3]: llama-3-70b
[3]: llama-3.1-70b
[4]: mixtral-8x7b
""",
type=click.Choice(["1", "2", "3", "4"]),
Expand All @@ -153,7 +153,7 @@ def version():
def chat(load, proxy, multiline, timeout, model):
"""CLI function to perform an interactive AI chat using DuckDuckGo API."""
client = DDGS(proxy=_expand_proxy_tb_alias(proxy))
model = ["gpt-4o-mini", "claude-3-haiku", "llama-3-70b", "mixtral-8x7b"][int(model) - 1]
model = ["gpt-4o-mini", "claude-3-haiku", "llama-3.1-70b", "mixtral-8x7b"][int(model) - 1]

cache_file = "ddgs_chat_conversation.json"
if load and Path(cache_file).exists():
Expand Down
9 changes: 8 additions & 1 deletion duckduckgo_search/duckduckgo_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,17 @@ def chat(self, keywords: str, model: str = "gpt-4o-mini", timeout: int = 30) ->
Returns:
str: The response from the AI.
"""
models_deprecated = {
"gpt-3.5": "gpt-4o-mini",
"llama-3-70b": "llama-3.1-70b",
}
if model in models_deprecated:
logger.info(f"{model=} is deprecated, using {models_deprecated[model]}")
model = models_deprecated[model]
models = {
"claude-3-haiku": "claude-3-haiku-20240307",
"gpt-4o-mini": "gpt-4o-mini",
"llama-3-70b": "meta-llama/Llama-3-70b-chat-hf",
"llama-3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo",
"mixtral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1",
}
# vqd
Expand Down

0 comments on commit 17146e9

Please sign in to comment.