Skip to content

Commit

Permalink
修复私有化模型导致的上下文失效
Browse files Browse the repository at this point in the history
  • Loading branch information
Haibersut authored Jul 28, 2023
1 parent 0b22e39 commit 176a766
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adapter/chatgpt/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ async def request_with_stream(self, session_id: str = None, messages: list = Non
if 'choices' in event and len(event['choices']) > 0 and 'delta' in event['choices'][0]:
delta = event['choices'][0]['delta']
if 'role' in delta:
response_role = delta['role']
if delta['role'] is not None:
response_role = delta['role']
if 'content' in delta:
event_text = delta['content']
if event_text is not None:
Expand Down

0 comments on commit 176a766

Please sign in to comment.