Skip to content

Commit

Permalink
✨ feat: add Higress ai model provider (lobehub#4755)
Browse files Browse the repository at this point in the history
* feat: add Higress ai model provider

* 📝 docs(bot): Auto sync agents & plugin to readme

* perf: 替换lodash导入,去除废弃PROXY_URL和MODEL_LIST

* perf: 去除agentRuntime多余higress配置

---------

Co-authored-by: 八月 <rentingting.rtt@alibaba-inc.com>
  • Loading branch information
WindWaving and 八月 authored Dec 6, 2024
1 parent 3c6895c commit 835bbf6
Show file tree
Hide file tree
Showing 10 changed files with 2,576 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ ENV \
# 01.AI
ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
# Zhipu
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST=""
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" \
# Higress
HIGRESS_API_KEY="" HIGRESS_MODEL_LIST=""

USER nextjs

Expand Down
4 changes: 3 additions & 1 deletion src/app/(main)/settings/llm/ProviderList/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
GiteeAIProviderCard,
GoogleProviderCard,
GroqProviderCard,
HigressProviderCard,
HunyuanProviderCard,
InternLMProviderCard,
MinimaxProviderCard,
Expand Down Expand Up @@ -38,8 +39,8 @@ import { useGithubProvider } from './Github';
import { useHuggingFaceProvider } from './HuggingFace';
import { useOllamaProvider } from './Ollama';
import { useOpenAIProvider } from './OpenAI';
import { useWenxinProvider } from './Wenxin';
import { useSenseNovaProvider } from './SenseNova';
import { useWenxinProvider } from './Wenxin';

export const useProviderList = (): ProviderItem[] => {
const AzureProvider = useAzureProvider();
Expand Down Expand Up @@ -89,6 +90,7 @@ export const useProviderList = (): ProviderItem[] => {
TaichuProviderCard,
InternLMProviderCard,
SiliconCloudProviderCard,
HigressProviderCard,
GiteeAIProviderCard,
],
[
Expand Down
9 changes: 8 additions & 1 deletion src/config/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ export const getLLMConfig = () => {

ENABLED_INTERNLM: z.boolean(),
INTERNLM_API_KEY: z.string().optional(),

ENABLED_HIGRESS: z.boolean(),
HIGRESS_API_KEY: z.string().optional(),
},
runtimeEnv: {
API_KEY_SELECT_MODE: process.env.API_KEY_SELECT_MODE,
Expand Down Expand Up @@ -231,7 +234,8 @@ export const getLLMConfig = () => {
ENABLED_HUGGINGFACE: !!process.env.HUGGINGFACE_API_KEY,
HUGGINGFACE_API_KEY: process.env.HUGGINGFACE_API_KEY,

ENABLED_SENSENOVA: !!process.env.SENSENOVA_ACCESS_KEY_ID && !!process.env.SENSENOVA_ACCESS_KEY_SECRET,
ENABLED_SENSENOVA:
!!process.env.SENSENOVA_ACCESS_KEY_ID && !!process.env.SENSENOVA_ACCESS_KEY_SECRET,
SENSENOVA_ACCESS_KEY_ID: process.env.SENSENOVA_ACCESS_KEY_ID,
SENSENOVA_ACCESS_KEY_SECRET: process.env.SENSENOVA_ACCESS_KEY_SECRET,

Expand All @@ -240,6 +244,9 @@ export const getLLMConfig = () => {

ENABLED_INTERNLM: !!process.env.INTERNLM_API_KEY,
INTERNLM_API_KEY: process.env.INTERNLM_API_KEY,

ENABLED_HIGRESS: !!process.env.HIGRESS_API_KEY,
HIGRESS_API_KEY: process.env.HIGRESS_API_KEY,
},
});
};
Expand Down
Loading

0 comments on commit 835bbf6

Please sign in to comment.