mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-15 17:35:55 +08:00
fix local variable ans (#3077)
### What problem does this PR solve? #3064 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
f86826b7a0
commit
7e0148c058
@ -109,6 +109,8 @@ class XinferenceChat(Base):
|
||||
if base_url.split("/")[-1] != "v1":
|
||||
base_url = os.path.join(base_url, "v1")
|
||||
super().__init__(key, model_name, base_url)
|
||||
|
||||
|
||||
class HuggingFaceChat(Base):
|
||||
def __init__(self, key=None, model_name="", base_url=""):
|
||||
if not base_url:
|
||||
@ -117,6 +119,7 @@ class HuggingFaceChat(Base):
|
||||
base_url = os.path.join(base_url, "v1")
|
||||
super().__init__(key, model_name, base_url)
|
||||
|
||||
|
||||
class DeepSeekChat(Base):
|
||||
def __init__(self, key, model_name="deepseek-chat", base_url="https://api.deepseek.com/v1"):
|
||||
if not base_url: base_url = "https://api.deepseek.com/v1"
|
||||
@ -1247,6 +1250,7 @@ class AnthropicChat(Base):
|
||||
if "max_tokens" not in gen_conf:
|
||||
gen_conf["max_tokens"] = 4096
|
||||
|
||||
ans = ""
|
||||
try:
|
||||
response = self.client.messages.create(
|
||||
model=self.model_name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user