diff --git a/frontend/src/features/admin-form/assistance/mutations.ts b/frontend/src/features/admin-form/assistance/mutations.ts index 0e24ee1cb8..0b4f3bf105 100644 --- a/frontend/src/features/admin-form/assistance/mutations.ts +++ b/frontend/src/features/admin-form/assistance/mutations.ts @@ -43,10 +43,7 @@ export const useAssistanceMutations = () => { try { formFields = JSON.parse(parseModelOutput(data.content)) } catch (e) { - toast({ - description: `Error creating form. Reason: ${e}`, - status: 'warning', - }) + console.error(e) throw e } } diff --git a/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderModalContent/PdfDetailsScreen.tsx b/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderModalContent/PdfDetailsScreen.tsx index dcace47563..cb56103d12 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderModalContent/PdfDetailsScreen.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderModalContent/PdfDetailsScreen.tsx @@ -44,6 +44,7 @@ export const MagicFormBuilderPdfDetailsScreen = (): JSX.Element => { } = formMethods pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker + // pdfjs.GlobalWorkerOptions.isEvalSupported = false const [pdfFile, setPdfFile] = useState() const [pdfFileText, setPdfFileText] = useState('') diff --git a/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderWizardProvider.tsx b/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderWizardProvider.tsx index f49c0e6dfd..45c9f480e5 100644 --- a/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderWizardProvider.tsx +++ b/frontend/src/features/admin-form/create/builder-and-design/MagicFormBuilderModal/MagicFormBuilderWizardProvider.tsx @@ -87,11 +87,8 @@ const useMagicFormBuilderWizardContext = ( description: 'Successfully created form', }) }, - onError: () => { - toast({ - description: 'Error creating form. Please try again.', - status: 'warning', - }) + onError: (error) => { + console.error(error) }, }) } @@ -104,11 +101,8 @@ const useMagicFormBuilderWizardContext = ( description: 'Successfully created form', }) }, - onError: () => { - toast({ - description: 'Error creating form. Please try again.', - status: 'warning', - }) + onError: (error) => { + console.error(error) }, }) } diff --git a/src/app/modules/form/admin-form/admin-form.assistance.service.ts b/src/app/modules/form/admin-form/admin-form.assistance.service.ts index 9746305f5f..e19b58e576 100644 --- a/src/app/modules/form/admin-form/admin-form.assistance.service.ts +++ b/src/app/modules/form/admin-form/admin-form.assistance.service.ts @@ -79,6 +79,7 @@ export const generateQuestions = ({ function: getExpectedQuestionsListTool, }, ], + topP: 0.1, } as GetChatCompletionsOptions return ResultAsync.fromPromise( diff --git a/src/app/routes/api/v3/admin/assistance/assistance.routes.ts b/src/app/routes/api/v3/admin/assistance/assistance.routes.ts index 48f7805140..8909d68fdd 100644 --- a/src/app/routes/api/v3/admin/assistance/assistance.routes.ts +++ b/src/app/routes/api/v3/admin/assistance/assistance.routes.ts @@ -10,11 +10,11 @@ export const AssistanceRouter = Router() AssistanceRouter.post( '/questions', - limitRate({ windowMs: 60 * 1000 * 60, max: 20 }), + limitRate({ windowMs: 60 * 1000 * 60, max: 100 }), handleGenerateQuestions, ) AssistanceRouter.post( '/form-fields', - limitRate({ windowMs: 60 * 1000 * 60, max: 20 }), + limitRate({ windowMs: 60 * 1000 * 60, max: 100 }), handleGenerateFormFields, )