Skip to content

Commit c9d2044

Browse files
committed
Fixed structured output response format
1 parent 2631ff4 commit c9d2044

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Services/InfoProviderSystem/Providers/AIInfoExtractor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,10 @@ private function callLLM(string $htmlContent, string $url): array
176176

177177
//'openai/gpt-5-mini'
178178
$result = $aiPlatform->invoke('openrouter/auto', $input, [
179-
'response_format' => 'json_schema',
180-
'json_schema' => $this->jsonSchemaConverter->getJSONSchema(),
179+
'response_format' => [
180+
'type' => 'json_schema',
181+
'json_schema' => $this->jsonSchemaConverter->getJSONSchema(),
182+
]
181183
]);
182184
} catch (\Throwable $e) {
183185
throw new \RuntimeException('LLM invocation failed: '.$e->getMessage(), previous: $e);

0 commit comments

Comments
 (0)