Skip to content

Commit

Permalink
fix bedrock issue (infiniflow#2776)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

infiniflow#2722

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh authored Oct 10, 2024
1 parent 6166275 commit 93bb243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rag/llm/chat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def chat_streamly(self, system, history, gen_conf):
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)
Expand All @@ -676,7 +676,7 @@ def chat_streamly(self, system, history, gen_conf):
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.
Expand Down

0 comments on commit 93bb243

Please sign in to comment.