Skip to content

Commit 485c908

Browse files
committed
decrease temperature for json responses
1 parent de14b36 commit 485c908

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Service/Agent/Sender.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ public function send(int $agentId, int $parentId, AgentInput $message, ContextIn
103103

104104
$messages = $messages->merge($userMessages);
105105

106+
$responseSchema = $this->getResponseSchema($row);
107+
106108
$options = [
107109
'tools' => $this->getTools($row),
108-
'temperature' => 0.2,
110+
'temperature' => $responseSchema !== null ? 0 : 0.4,
109111
];
110112

111-
$responseSchema = $this->getResponseSchema($row);
112113
if ($responseSchema !== null) {
113114
$options['response_format'] = [
114115
'type' => 'json_schema',

0 commit comments

Comments
 (0)