mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add support for Upstage (#1902)
### 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>
This commit is contained in:
@ -41,6 +41,7 @@ EmbeddingModel = {
|
||||
"cohere": CoHereEmbed,
|
||||
"TogetherAI": TogetherAIEmbed,
|
||||
"PerfXCloud": PerfXCloudEmbed,
|
||||
"Upstage": UpstageEmbed
|
||||
}
|
||||
|
||||
|
||||
@ -89,7 +90,8 @@ ChatModel = {
|
||||
"cohere": CoHereChat,
|
||||
"LeptonAI": LeptonAIChat,
|
||||
"TogetherAI": TogetherAIChat,
|
||||
"PerfXCloud": PerfXCloudChat
|
||||
"PerfXCloud": PerfXCloudChat,
|
||||
"Upstage":UpstageChat
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1002,3 +1002,10 @@ class PerfXCloudChat(Base):
|
||||
if not base_url:
|
||||
base_url = "https://cloud.perfxlab.cn/v1"
|
||||
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)
|
||||
|
||||
@ -567,4 +567,10 @@ class PerfXCloudEmbed(OpenAIEmbed):
|
||||
if not base_url:
|
||||
base_url = "https://cloud.perfxlab.cn/v1"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user