Skip to content

Commit

Permalink
Merge branch 'feat/model-runtime' into deploy/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeuoly committed Dec 28, 2023
2 parents c468061 + b181682 commit e31f6c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def generate(self, model: str, api_key: str, group_id: str,
raise BadRequestError('At least one message is required')

if prompt_messages[0].role == MinimaxMessage.Role.SYSTEM.value:
prompt = prompt_messages[0].content
if prompt_messages[0].content:
prompt = prompt_messages[0].content
prompt_messages = prompt_messages[1:]

# check if there is a user message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def generate(self, model: str, api_key: str, group_id: str,
raise BadRequestError('At least one message is required')

if prompt_messages[0].role == MinimaxMessage.Role.SYSTEM.value:
bot_setting['content'] = prompt_messages[0].content
if prompt_messages[0].content:
bot_setting['content'] = prompt_messages[0].content
prompt_messages = prompt_messages[1:]

# check if there is a user message
Expand Down

0 comments on commit e31f6c2

Please sign in to comment.