Skip to content

Commit

Permalink
Fix OpenAI response text links
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukaaashek committed Jul 25, 2024
1 parent e55d808 commit d72e945
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Solutions/OpenAi/OpenAiSolutionResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public function links(): array

$links = [];
foreach ($textLinks as $textLink) {
$links[$textLink['title']] = $textLink['url'];
if (isset($textLink['title']) && isset($textLink['url'])) {
$links[$textLink['title']] = $textLink['url'];
}
}

return $links;
Expand Down

0 comments on commit d72e945

Please sign in to comment.