Skip to content

Commit 1233905

Browse files
authored
fix: merge options into claude payload (#6)
1 parent 3513643 commit 1233905

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Anthropic/Model/Claude.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ public function __construct(
2424
public function call(MessageBag $messages, array $options = []): Response
2525
{
2626
$system = $messages->getSystemMessage();
27-
28-
$response = $this->runtime->request([
27+
$body = [
2928
'model' => $this->version->value,
3029
'temperature' => $this->temperature,
3130
'max_tokens' => $this->maxTokens,
3231
'system' => $system->content,
3332
'messages' => $messages->withoutSystemMessage(),
34-
]);
33+
];
34+
35+
$response = $this->runtime->request(array_merge($body, $options));
3536

3637
return new Response(new Choice($response['content'][0]['text']));
3738
}

0 commit comments

Comments
 (0)