mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
feat: Add support for DeepSeek API base URL
This commit is contained in:
parent
d4ae735d43
commit
7822c1c879
1 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
import backoff
|
import backoff
|
||||||
|
|
||||||
|
@ -57,6 +58,9 @@ def send_completion(
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
stream=stream,
|
stream=stream,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if model_name.startswith("deepseek/") and "DEEPSEEK_API_BASE" in os.environ:
|
||||||
|
kwargs["base_url"] = os.environ["DEEPSEEK_API_BASE"]
|
||||||
if functions is not None:
|
if functions is not None:
|
||||||
kwargs["functions"] = functions
|
kwargs["functions"] = functions
|
||||||
if extra_headers is not None:
|
if extra_headers is not None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue