### What problem does this PR solve? #1853 add support for Upstage ### Type of change - [x] New Feature (non-breaking change which adds functionality) Co-authored-by: Zhedong Cen <cenzhedong2@126.com>tags/v0.10.0
| "model_type": "embedding" | "model_type": "embedding" | ||||
| } | } | ||||
| ] | ] | ||||
| }, | |||||
| { | |||||
| "name": "Upstage", | |||||
| "logo": "", | |||||
| "tags": "LLM,TEXT EMBEDDING", | |||||
| "status": "1", | |||||
| "llm": [ | |||||
| { | |||||
| "llm_name": "solar-1-mini-chat", | |||||
| "tags": "LLM,CHAT,32k", | |||||
| "max_tokens": 32768, | |||||
| "model_type": "chat" | |||||
| }, | |||||
| { | |||||
| "llm_name": "solar-1-mini-chat-ja", | |||||
| "tags": "LLM,CHAT,32k", | |||||
| "max_tokens": 32768, | |||||
| "model_type": "chat" | |||||
| }, | |||||
| { | |||||
| "llm_name": "solar-embedding-1-large-query", | |||||
| "tags": "TEXT EMBEDDING", | |||||
| "max_tokens": 4000, | |||||
| "model_type": "embedding" | |||||
| }, | |||||
| { | |||||
| "llm_name": "solar-embedding-1-large-passage", | |||||
| "tags": "TEXT EMBEDDING", | |||||
| "max_tokens": 4000, | |||||
| "model_type": "embedding" | |||||
| } | |||||
| ] | |||||
| } | } | ||||
| ] | ] | ||||
| } | } |
| "cohere": CoHereEmbed, | "cohere": CoHereEmbed, | ||||
| "TogetherAI": TogetherAIEmbed, | "TogetherAI": TogetherAIEmbed, | ||||
| "PerfXCloud": PerfXCloudEmbed, | "PerfXCloud": PerfXCloudEmbed, | ||||
| "Upstage": UpstageEmbed | |||||
| } | } | ||||
| "cohere": CoHereChat, | "cohere": CoHereChat, | ||||
| "LeptonAI": LeptonAIChat, | "LeptonAI": LeptonAIChat, | ||||
| "TogetherAI": TogetherAIChat, | "TogetherAI": TogetherAIChat, | ||||
| "PerfXCloud": PerfXCloudChat | |||||
| "PerfXCloud": PerfXCloudChat, | |||||
| "Upstage":UpstageChat | |||||
| } | } | ||||
| if not base_url: | if not base_url: | ||||
| base_url = "https://cloud.perfxlab.cn/v1" | base_url = "https://cloud.perfxlab.cn/v1" | ||||
| super().__init__(key, model_name, base_url) | super().__init__(key, model_name, base_url) | ||||
| class UpstageChat(Base): | |||||
| def __init__(self, key, model_name, base_url="https://api.upstage.ai/v1/solar"): | |||||
| if not base_url: | |||||
| base_url = "https://api.upstage.ai/v1/solar" | |||||
| super().__init__(key, model_name, base_url) |
| if not base_url: | if not base_url: | ||||
| base_url = "https://cloud.perfxlab.cn/v1" | base_url = "https://cloud.perfxlab.cn/v1" | ||||
| super().__init__(key, model_name, base_url) | super().__init__(key, model_name, base_url) | ||||
| class UpstageEmbed(OpenAIEmbed): | |||||
| def __init__(self, key, model_name, base_url="https://api.upstage.ai/v1/solar"): | |||||
| if not base_url: | |||||
| base_url = "https://api.upstage.ai/v1/solar" | |||||
| super().__init__(key, model_name, base_url) |
| cohere: 'cohere', | cohere: 'cohere', | ||||
| Lepton: 'lepton', | Lepton: 'lepton', | ||||
| TogetherAI:'together-ai', | TogetherAI:'together-ai', | ||||
| PerfXCould: 'perfx-could' | |||||
| PerfXCould: 'perfx-could', | |||||
| Upstage: 'upstage' | |||||
| }; | }; | ||||
| export const BedrockRegionList = [ | export const BedrockRegionList = [ |