Skip to content

Commit

Permalink
improve: [llm_adapter] use deepseek-coder instead of deepseek-chat by…
Browse files Browse the repository at this point in the history
… default
  • Loading branch information
luochen1990 committed Jul 31, 2024
1 parent e2a92b3 commit 7688669
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ai_powered/llm_adapter/known_models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from copy import deepcopy
from dataclasses import dataclass, field
from typing import Any, Callable, Optional, Set, TypeAlias

Expand Down Expand Up @@ -45,8 +46,8 @@ def equals(s: str) -> Callable[[str], bool]:
platform_name = "deepseek",
match_platform_url = contains("deepseek"),
known_model_list = [
KnownModel("deepseek-chat", {"function_call", "response_json"}),
KnownModel("deepseek-coder", {"function_call", "response_json"}),
KnownModel("deepseek-chat", {"function_call", "response_json"}),
]
),
KnownPlatform(
Expand All @@ -71,7 +72,12 @@ def complete_model_config(platform_url: str, model_name: Optional[str]) -> Model
return known_model
else:
return platform.known_model_list[0] #known platform, but model not specified
return platform.known_model_list[0] #known platform, but unknown model specified

#known platform, but unknown model_name specified
cfg = deepcopy(platform.known_model_list[0])
cfg.model_name = model_name
return cfg

#unknown platform
if model_name is not None:
return ModelConfig(model_name, ALL_FEATURES)
Expand Down

0 comments on commit 7688669

Please sign in to comment.