Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Controller/ChattyLLMController.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ public function newMessage(int $sessionId, string $role, string $content, int $t
$message->setRole($role);
$message->setContent($content);
$message->setTimestamp($timestamp);
$message->setSources('[]');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be automatically be populated by the default value, no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to test. I'm not sure why that doesn't work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the message gets returned without refetching it from the db. In the db the default is applied, but not in the message object

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah alright that makes sense. Nice one.

$this->messageMapper->insert($message);

if ($firstHumanMessage) {
Expand Down