Skip to content

Commit e58bc70

Browse files
committed
fix proofread
1 parent c6e7713 commit e58bc70

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Services/Proofread/OpenAiService.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,15 @@ public function proofreadAllWithConcurrency(array $texts): array
6969
{
7070
$prompt = $this->prompt;
7171

72+
$model = $this->model;
73+
7274
$tasks = collect($texts)
7375
->chunk($this->chunk)
74-
->map(function ($chunk) use ($prompt) {
76+
->map(function ($chunk) use ($model, $prompt) {
7577

76-
return function () use ($prompt, $chunk) {
78+
return function () use ($model, $prompt, $chunk) {
7779
$response = static::makeClient()->chat()->create([
78-
'model' => $this->model,
80+
'model' => $model,
7981
'response_format' => ['type' => 'json_object'],
8082
'messages' => [
8183
[

0 commit comments

Comments
 (0)