Skip to content

Commit 79cf197

Browse files
committed
chunk 20
1 parent 4fe4825 commit 79cf197

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
@@ -18,7 +18,7 @@ public function __construct(
1818
public function fixAll(array $texts): array
1919
{
2020
return collect($texts)
21-
->chunk(50)
21+
->chunk(20)
2222
->flatMap(function (Collection $chunk) {
2323
$response = OpenAI::chat()->create([
2424
'model' => $this->model,

src/Services/Translate/OpenAiService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function __construct(
1818
public function translateAll(array $texts, string $targetLocale): array
1919
{
2020
return collect($texts)
21-
->chunk(50)
21+
->chunk(20)
2222
->flatMap(function (Collection $chunk) use ($targetLocale) {
2323
$response = OpenAI::chat()->create([
2424
'model' => $this->model,

0 commit comments

Comments
 (0)