Просмотр исходного кода

Fix: Bedrock model invocation error. (#6533)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu 7 месяцев назад
Родитель
Сommit
12ad746ee6
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 2 добавлений и 2 удалений
  1. 2
    2
      rag/llm/chat_model.py

+ 2
- 2
rag/llm/chat_model.py Просмотреть файл

@@ -829,7 +829,7 @@ class BedrockChat(Base):
def chat(self, system, history, gen_conf):
from botocore.exceptions import ClientError
for k in list(gen_conf.keys()):
if k not in ["top_p", "max_tokens"]:
if k not in ["temperature"]:
del gen_conf[k]
for item in history:
if not isinstance(item["content"], list) and not isinstance(item["content"], tuple):
@@ -854,7 +854,7 @@ class BedrockChat(Base):
def chat_streamly(self, system, history, gen_conf):
from botocore.exceptions import ClientError
for k in list(gen_conf.keys()):
if k not in ["top_p", "max_tokens"]:
if k not in ["temperature"]:
del gen_conf[k]
for item in history:
if not isinstance(item["content"], list) and not isinstance(item["content"], tuple):

Загрузка…
Отмена
Сохранить