Skip to content

Commit 79c18a8

Browse files
committed
Fix
1 parent 5626e6a commit 79c18a8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/LLM.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ public function generate(
6161
$request['messages'][] = $this->messageMapper->map($message);
6262
}
6363

64-
if ($options->has(Option::Tools)) {
64+
if ($options->has(Option::Tools->value)) {
6565
$request = $this->configureTools($options, $request);
6666
}
6767

6868
$callback = null;
69-
if ($options->has(Option::StreamChunkCallback)) {
70-
$callback = $options->get(Option::StreamChunkCallback);
69+
if ($options->has(Option::StreamChunkCallback->value)) {
70+
$callback = $options->get(Option::StreamChunkCallback->value);
7171
\assert($callback instanceof StreamChunkCallbackInterface);
7272
}
7373

@@ -108,12 +108,12 @@ protected function buildOptions(OptionsInterface $options): array
108108
return \array_filter($result, static fn($value): bool => $value !== null);
109109
}
110110

111-
protected function configureTools(Options $options, array $request): array
111+
protected function configureTools(OptionsInterface $options, array $request): array
112112
{
113113
$tools = \array_values(
114114
\array_map(
115115
fn(Tool $tool): array => $this->messageMapper->map($tool),
116-
$options->get(Option::Tools),
116+
$options->get(Option::Tools->value),
117117
),
118118
);
119119

0 commit comments

Comments
 (0)