Skip to content

Commit

Permalink
Merge pull request #9 from Lukaaashek/main
Browse files Browse the repository at this point in the history
Fix OpenAI response text links
  • Loading branch information
freekmurze authored Jul 25, 2024
2 parents e55d808 + d72e945 commit ae73931
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 ae73931

Please sign in to comment.