Skip to content

Commit 9cfd03a

Browse files
authored
update ai gateway scripts (#126)
1 parent e2e0c6f commit 9cfd03a

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

all-in-one/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG HUB=higress-registry.cn-hangzhou.cr.aliyuncs.com/higress
22
ARG BASE_VERSION=2022-10-27T19-02-22
3-
ARG CORE_VERSION=2.0.6-rc.2
4-
ARG CONSOLE_VERSION=2.0.1
3+
ARG CORE_VERSION=2.0.6
4+
ARG CONSOLE_VERSION=2.0.2
55
ARG APISERVER_VERSION=0.0.19
66
ARG PROMETHEUS_VERSION=v2.40.7
77
ARG PROMTAIL_VERSION=2.9.4

all-in-one/get-ai-gateway.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -146,26 +146,26 @@ runConfigWizard() {
146146
"OpenAI|OPENAI"
147147
"Aliyun Dashscope|DASHSCOPE"
148148
"Moonshot|MOONSHOT"
149-
# "Azure OpenAI|AZURE|configureAzureProvider"
150-
# "360 Zhinao|AI360"
149+
"Azure OpenAI|AZURE|configureAzureProvider"
150+
"360 Zhinao|AI360"
151151
# "Github Models|GITHUB"
152152
# "Groq|GROQ"
153153
"Baichuan AI|BAICHUAN"
154154
"01.AI|YI"
155-
# "DeepSeek|DEEPSEEK"
155+
"DeepSeek|DEEPSEEK"
156156
"Zhipu AI|ZHIPUAI"
157-
# "Ollama|OLLAMA|configureOllamaProvider"
157+
"Ollama|OLLAMA|configureOllamaProvider"
158158
"Claude|CLAUDE|configureClaudeProvider"
159-
# "Baidu AI Cloud|BAIDU"
159+
"Baidu AI Cloud|BAIDU"
160160
# "Tencent Hunyuan|HUNYUAN"
161161
"Stepfun|STEPFUN"
162162
"Minimax|MINIMAX|configureMinimaxProvider"
163163
# "Cloudflare Workers AI|CLOUDFLARE"
164164
# "iFlyTek Spark|SPARK"
165-
# "Google Gemini|GEMINI"
165+
"Google Gemini|GEMINI"
166166
# "DeepL|DEEPL"
167-
# "Mistral AI|MISTRAL"
168-
# "Cohere|COHERE"
167+
"Mistral AI|MISTRAL"
168+
"Cohere|COHERE"
169169
"Doubao|DOUBAO"
170170
# "Coze|COZE"
171171
)

all-in-one/scripts/config-template/ai-gateway.sh

+24-24
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,35 @@ function initializeLlmProviderConfigs() {
1616

1717
initializeLlmProviderConfig aliyun qwen DASHSCOPE dashscope.aliyuncs.com "443" "https" "" "PRE" 'qwen-'
1818
initializeLlmProviderConfig moonshot moonshot MOONSHOT api.moonshot.cn "443" "https" "" "PRE" 'moonshot-'
19-
initializeLlmProviderConfig openai openai OPENAI api.openai.com "443" "https" "" "REGULAR" 'gpt\\-.*|o1\\-.*'
20-
# initializeLlmProviderConfig ai360 ai360 AI360 api.360.cn "443" "https" "" "PRE" ""
19+
initializeLlmProviderConfig openai openai OPENAI api.openai.com "443" "https" "" "REGULAR" 'gpt-.*|o1-.*|o3-.*'
20+
initializeLlmProviderConfig ai360 ai360 AI360 api.360.cn "443" "https" "" "PRE" "360GPT"
2121
# initializeLlmProviderConfig github github GITHUB models.inference.ai.azure.com "443" "https" "" "PRE" ""
2222
# initializeLlmProviderConfig groq groq GROQ api.groq.com "443" "https" "" "PRE" ""
2323
initializeLlmProviderConfig baichuan baichuan BAICHUAN api.baichuan-ai.com "443" "https" "" "PRE" "Baichuan"
2424
initializeLlmProviderConfig yi yi YI api.lingyiwanwu.com "443" "https" "" "PRE" 'yi-'
2525
initializeLlmProviderConfig deepseek deepseek DEEPSEEK api.deepseek.com "443" "https" "" "PRE" "deepseek"
2626
initializeLlmProviderConfig zhipuai zhipuai ZHIPUAI open.bigmodel.cn "443" "https" "" "PRE" "GLM-"
27-
# initializeLlmProviderConfig baidu baidu BAIDU aip.baidubce.com "443" "https" "" "PRE" "ERNIE-"
27+
initializeLlmProviderConfig baidu baidu BAIDU qianfan.baidubce.com "443" "https" "" "PRE" "ERNIE-"
2828
# initializeLlmProviderConfig hunyuan hunyuan HUNYUAN hunyuan.tencentcloudapi.com "443" "https" "" "PRE" "hunyuan-" "${EXTRA_CONFIGS[@]}"
2929
initializeLlmProviderConfig stepfun stepfun STEPFUN api.stepfun.com "443" "https" "" "PRE" "step-"
3030
# initializeLlmProviderConfig cloudflare cloudflare CLOUDFLARE api.cloudflare.com "443" "https" "" "PRE" "" "${EXTRA_CONFIGS[@]}"
3131
# initializeLlmProviderConfig spark spark SPARK spark-api-open.xf-yun.com "443" "https" "" "PRE" "" "${EXTRA_CONFIGS[@]}"
32-
# initializeLlmProviderConfig gemini gemini GEMINI generativelanguage.googleapis.com "443" "https" "" "PRE" "gemini-"
32+
initializeLlmProviderConfig gemini gemini GEMINI generativelanguage.googleapis.com "443" "https" "" "PRE" "gemini-"
3333
# initializeLlmProviderConfig deepl deepl DEEPL "443" "https" "" "PRE" "" "${EXTRA_CONFIGS[@]}"
34-
# initializeLlmProviderConfig mistral mistral MISTRAL api.mistral.ai "443" "https" "" "PRE" ""
35-
# initializeLlmProviderConfig cohere cohere COHERE api.cohere.com "443" "https" "" "PRE" ""
34+
initializeLlmProviderConfig mistral mistral MISTRAL api.mistral.ai "443" "https" "" "REGULAR" 'open-mistral-.*|mistral-.*'
35+
initializeLlmProviderConfig cohere cohere COHERE api.cohere.com "443" "https" "" "REGULAR" 'command|command-.*'
3636
initializeLlmProviderConfig doubao doubao DOUBAO ark.cn-beijing.volces.com "443" "https" "" "PRE" "doubao-"
3737
# initializeLlmProviderConfig coze coze COZE api.coze.cn "443" "https" "" "PRE" ""
3838

39-
# if [ -z "$AZURE_SERVICE_URL" ]; then
40-
# AZURE_SERVICE_URL="https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-06-01"
41-
# fi
42-
# extractHostFromUrl "$AZURE_SERVICE_URL"
43-
# local AZURE_SERVICE_DOMAIN="$HOST"
44-
# EXTRA_CONFIGS=(
45-
# "azureServiceUrl=$AZURE_SERVICE_URL"
46-
# )
47-
# initializeLlmProviderConfig azure azure AZURE "$AZURE_SERVICE_DOMAIN" "443" "https" "" "PRE" "" "${EXTRA_CONFIGS[@]}"
39+
if [ -z "$AZURE_SERVICE_URL" ]; then
40+
AZURE_SERVICE_URL="https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/chat/completions?api-version=2024-06-01"
41+
fi
42+
extractHostFromUrl "$AZURE_SERVICE_URL"
43+
local AZURE_SERVICE_DOMAIN="$HOST"
44+
EXTRA_CONFIGS=(
45+
"azureServiceUrl=$AZURE_SERVICE_URL"
46+
)
47+
initializeLlmProviderConfig azure azure AZURE "$AZURE_SERVICE_DOMAIN" "443" "https" "" "REGULAR" 'gpt-.*|o1-.*|o3-.*' "${EXTRA_CONFIGS[@]}"
4848

4949
if [ -z "$CLAUDE_VERSION" ]; then
5050
CLAUDE_VERSION="2023-06-01"
@@ -54,15 +54,15 @@ function initializeLlmProviderConfigs() {
5454
)
5555
initializeLlmProviderConfig claude claude CLAUDE api.anthropic.com "443" "https" "" "PRE" "claude-" "${EXTRA_CONFIGS[@]}"
5656

57-
# if [ -z "$OLLAMA_SERVER_HOST" ]; then
58-
# OLLAMA_SERVER_HOST="YOUR_OLLAMA_SERVER_HOST"
59-
# fi
60-
# OLLAMA_SERVER_PORT="${OLLAMA_SERVER_PORT:-11434}"
61-
# EXTRA_CONFIGS=(
62-
# "ollamaServerHost=\"$OLLAMA_SERVER_HOST\""
63-
# "ollamaServerPort=$OLLAMA_SERVER_PORT"
64-
# )
65-
# initializeLlmProviderConfig ollama ollama OLLAMA "$OLLAMA_SERVER_HOST" "$OLLAMA_SERVER_PORT" "http" "" "PRE" "" "${EXTRA_CONFIGS[@]}"
57+
if [ -z "$OLLAMA_SERVER_HOST" ]; then
58+
OLLAMA_SERVER_HOST="YOUR_OLLAMA_SERVER_HOST"
59+
fi
60+
OLLAMA_SERVER_PORT="${OLLAMA_SERVER_PORT:-11434}"
61+
EXTRA_CONFIGS=(
62+
"ollamaServerHost=\"$OLLAMA_SERVER_HOST\""
63+
"ollamaServerPort=$OLLAMA_SERVER_PORT"
64+
)
65+
initializeLlmProviderConfig ollama ollama OLLAMA "$OLLAMA_SERVER_HOST" "$OLLAMA_SERVER_PORT" "http" "" "REGULAR" 'codellama.*|llama.*' "${EXTRA_CONFIGS[@]}"
6666

6767
EXTRA_CONFIGS=(
6868
"minimaxGroupId=\"$MINIMAX_GROUP_ID\""

0 commit comments

Comments
 (0)