mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 17:24:59 +00:00
feat: Add --deepseek-beta bool arg to use DeepSeek Coder via the beta API endpoint
This commit is contained in:
parent
5f8df315e4
commit
485418d917
2 changed files with 11 additions and 2 deletions
|
@ -117,6 +117,12 @@ def get_parser(default_config_files, git_root):
|
|||
const=deepseek_model,
|
||||
help=f"Use {deepseek_model} model for the main chat",
|
||||
)
|
||||
group.add_argument(
|
||||
"--deepseek-beta",
|
||||
action="store_true",
|
||||
help="Uses DeepSeek Coder via the beta API endpoint",
|
||||
default=False,
|
||||
)
|
||||
|
||||
##########
|
||||
group = parser.add_argument_group("Model Settings")
|
||||
|
|
|
@ -59,8 +59,11 @@ def send_completion(
|
|||
stream=stream,
|
||||
)
|
||||
|
||||
if model_name.startswith("deepseek/") and "DEEPSEEK_API_BASE" in os.environ:
|
||||
kwargs["base_url"] = os.environ["DEEPSEEK_API_BASE"]
|
||||
if model_name.startswith("deepseek/"):
|
||||
if "DEEPSEEK_API_BASE" in os.environ:
|
||||
kwargs["base_url"] = os.environ["DEEPSEEK_API_BASE"]
|
||||
elif getattr(kwargs.get('extra_headers', {}), 'deepseek_beta', False):
|
||||
kwargs["base_url"] = "https://api.deepseek.com/v1"
|
||||
if functions is not None:
|
||||
kwargs["functions"] = functions
|
||||
if extra_headers is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue