Skip to content

Commit 0685234

Browse files
committed
fix openai
1 parent 4bc0043 commit 0685234

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Services/Grammar/OpenAiService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function fixAll(array $texts): array
3838
$content = $response->choices[0]->message->content;
3939
$translations = json_decode($content, true);
4040

41-
return $translations;
41+
return collect($translations)->dot();
4242
})
4343
->toArray();
4444
}

src/Services/Translate/OpenAiService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function translateAll(array $texts, string $targetLocale): array
3838
$content = $response->choices[0]->message->content;
3939
$translations = json_decode($content, true);
4040

41-
return $translations;
41+
return collect($translations)->dot();
4242
})
4343
->toArray();
4444
}

0 commit comments

Comments
 (0)