mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 22:08:59 +08:00
fix bedrock issue (#2776)
### What problem does this PR solve? #2722 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
485bfd6c08
commit
29f022c91c
@ -661,7 +661,7 @@ class BedrockChat(Base):
|
||||
modelId=self.model_name,
|
||||
messages=history,
|
||||
inferenceConfig=gen_conf,
|
||||
system=[{"text": system}] if system else None,
|
||||
system=[{"text": (system if system else "Answer the user's message.")}]
|
||||
)
|
||||
ans = response["output"]["message"]["content"][0]["text"]
|
||||
return ans, num_tokens_from_string(ans)
|
||||
@ -676,7 +676,7 @@ class BedrockChat(Base):
|
||||
modelId=self.model_name,
|
||||
messages=history,
|
||||
inferenceConfig=gen_conf,
|
||||
system=[{"text": system if system else ""}],
|
||||
system=[{"text": (system if system else "Answer the user's message.")}]
|
||||
)
|
||||
|
||||
# Extract and print the streamed response text in real-time.
|
||||
|
Loading…
x
Reference in New Issue
Block a user