|
|
@@ -105,14 +105,6 @@ class Message(BaseModel):
|
|
|
|
|
|
message_dict: dict = {'content': content, 'role': self.role}
|
|
|
|
|
|
- # pop content if it's empty
|
|
|
- if not content or (
|
|
|
- len(content) == 1
|
|
|
- and content[0]['type'] == 'text'
|
|
|
- and content[0]['text'] == ''
|
|
|
- ):
|
|
|
- message_dict.pop('content')
|
|
|
-
|
|
|
if role_tool_with_prompt_caching:
|
|
|
message_dict['cache_control'] = {'type': 'ephemeral'}
|
|
|
|