Skip to content

Commit

Permalink
fix issue where message is none (#5307)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored Nov 28, 2024
1 parent b808a63 commit 3ac57a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openhands/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def wrapper(*args, **kwargs):
with open(log_file, 'w') as f:
f.write(json.dumps(_d))

message_back: str = resp['choices'][0]['message']['content']
message_back: str = resp['choices'][0]['message']['content'] or ''
tool_calls = resp['choices'][0]['message'].get('tool_calls', [])
if tool_calls:
for tool_call in tool_calls:
Expand Down

0 comments on commit 3ac57a6

Please sign in to comment.