Skip to content

Commit 5bf1ddc

Browse files
committed
fix chat history
1 parent 2232ac7 commit 5bf1ddc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Chat/History/AbstractChatHistory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ protected function deserializeToolCallResult(array $message): ToolResultMessage
194194
}
195195

196196
/**
197-
* Deserialize content from storage format to ContentBlock array.
197+
* Deserialize content from the storage format to the ContentBlock array.
198198
*
199-
* Handles both legacy string format and new content block array format.
199+
* Handles both legacy string format and the new content block array format.
200200
* Legacy formats are automatically converted to ContentBlocks for migration.
201201
*
202202
* @return string|ContentBlockInterface|ContentBlockInterface[]|null

src/Chat/History/EloquentChatHistory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected function serializeMessageMeta(Message $message): array
122122
$serialized = $message->jsonSerialize();
123123

124124
// Remove fields that are stored in separate columns
125-
unset($serialized['role'], $serialized['content'], $message['usage']);
125+
unset($serialized['role'], $serialized['content']);
126126

127127
return $serialized;
128128
}

0 commit comments

Comments
 (0)