Improve Templates (#183)

* Improve Templates

* Fix test case

* Update AI GenerateTemplate

* update openai client and GPT completer

* composer.lock

* Update types and list json with script

* Template changes

* fix on draft template

* Finish opnform templates

---------

Co-authored-by: Forms Dev <chirag+new@notionforms.io>
Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Chirag Chhatrala
2023-09-08 16:30:28 +05:30
committed by GitHub
parent d93eca7410
commit 8e47b49e9a
36 changed files with 3130 additions and 1381 deletions

View File

@@ -14,8 +14,10 @@ it('can create template', function () {
$templateData = [
'name' => 'Demo Template',
'slug' => 'demo_template',
'description' => 'Some description here...',
'short_description' => 'Short description here...',
'description' => 'Some long description here...',
'image_url' => 'https://d3ietpyl4f2d18.cloudfront.net/6c35a864-ee3a-4039-80a4-040b6c20ac60/img/pages/welcome/product_cover.jpg',
'publicly_listed' => true,
'form' => $form->getAttributes(),
'questions' => [['question'=>'Question 1','answer'=>'Answer 1 will be here...']]
];
@@ -23,6 +25,6 @@ it('can create template', function () {
->assertSuccessful()
->assertJson([
'type' => 'success',
'message' => 'Template created.'
'message' => 'Template was created.'
]);
});