Fix form AI creation bug + use gpt4 turbo with Json mode

This commit is contained in:
Julien Nahum
2024-01-29 10:25:00 +01:00
parent 28e55574e6
commit 381824183c
5 changed files with 35 additions and 14 deletions

View File

@@ -39,7 +39,8 @@ class GenerateAiForm implements ShouldQueue
$completer = (new GptCompleter(config('services.openai.api_key')))
->useStreaming()
->setSystemMessage('You are a robot helping to generate forms.');
->setSystemMessage('You are a robot helping to generate forms.')
->expectsJson();
try {
$completer->completeChat([