mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 05:37:20 +08:00
Refactor: Simplify message formatting (#2670)
Removed redundant `str()` conversion in f-string.
This commit is contained in:
committed by
GitHub
parent
917d96e06f
commit
af9385322b
@@ -21,7 +21,7 @@ def process_jsonl(input_file, model_name, output_file):
|
||||
) # Write the list of JSON objects to a file
|
||||
print(f'Output JSON list created at {output_file}')
|
||||
except Exception as e:
|
||||
print(f'Error: {str(e)}')
|
||||
print(f'Error: {e}')
|
||||
|
||||
|
||||
# Usage: python script.py input.jsonl model_name output.json
|
||||
|
||||
@@ -122,7 +122,7 @@ class AgentController:
|
||||
"""
|
||||
self.state.error = message
|
||||
if exception:
|
||||
self.state.error += f': {str(exception)}'
|
||||
self.state.error += f': {exception}'
|
||||
await self.event_stream.add_event(ErrorObservation(message), EventSource.AGENT)
|
||||
|
||||
async def add_history(self, action: Action, observation: Observation):
|
||||
|
||||
Reference in New Issue
Block a user