Skip to content

Commit a5f39e3

Browse files
authored
1 parent 4c67ded commit a5f39e3

File tree

4 files changed

+956
-3
lines changed

4 files changed

+956
-3
lines changed

api/config.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from api.openrouter_client import OpenRouterClient
1212
from api.bedrock_client import BedrockClient
1313
from api.azureai_client import AzureAIClient
14+
from api.dashscope_client import DashscopeClient
1415
from adalflow import GoogleGenAIClient, OllamaClient
1516

1617
# Get API keys from environment variables
@@ -53,7 +54,8 @@
5354
"OpenRouterClient": OpenRouterClient,
5455
"OllamaClient": OllamaClient,
5556
"BedrockClient": BedrockClient,
56-
"AzureAIClient": AzureAIClient
57+
"AzureAIClient": AzureAIClient,
58+
"DashscopeClient": DashscopeClient
5759
}
5860

5961
def replace_env_placeholders(config: Union[Dict[str, Any], List[Any], str, Any]) -> Union[Dict[str, Any], List[Any], str, Any]:
@@ -121,14 +123,15 @@ def load_generator_config():
121123
if provider_config.get("client_class") in CLIENT_CLASSES:
122124
provider_config["model_client"] = CLIENT_CLASSES[provider_config["client_class"]]
123125
# Fall back to default mapping based on provider_id
124-
elif provider_id in ["google", "openai", "openrouter", "ollama", "bedrock", "azure"]:
126+
elif provider_id in ["google", "openai", "openrouter", "ollama", "bedrock", "azure", "dashscope"]:
125127
default_map = {
126128
"google": GoogleGenAIClient,
127129
"openai": OpenAIClient,
128130
"openrouter": OpenRouterClient,
129131
"ollama": OllamaClient,
130132
"bedrock": BedrockClient,
131-
"azure": AzureAIClient
133+
"azure": AzureAIClient,
134+
"dashscope": DashscopeClient
132135
}
133136
provider_config["model_client"] = default_map[provider_id]
134137
else:

api/config/generator.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
{
22
"default_provider": "google",
33
"providers": {
4+
"dashscope": {
5+
"default_model": "qwen-plus",
6+
"supportsCustomModel": true,
7+
"models": {
8+
"qwen-plus": {
9+
"temperature": 0.7,
10+
"top_p": 0.8
11+
},
12+
"qwen-turbo": {
13+
"temperature": 0.7,
14+
"top_p": 0.8
15+
},
16+
"deepseek-r1": {
17+
"temperature": 0.7,
18+
"top_p": 0.8
19+
}
20+
}
21+
},
422
"google": {
523
"default_model": "gemini-2.0-flash",
624
"supportsCustomModel": true,

0 commit comments

Comments
 (0)