-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove old docs Add changelog and docs for new AI assistant and folder/route toggling.
- Loading branch information
Showing
357 changed files
with
1,526 additions
and
511 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 33 additions & 22 deletions
55
content/docs/latest/mockoon-cloud/templates-and-ai-assistant.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,79 @@ | ||
--- | ||
title: Templates and AI assistant | ||
title: AI assistants | ||
meta: | ||
title: Mockoon templates and AI assistant documentation | ||
description: All you need to know about Mockoon's mock API ready to use JSON templates and AI assistant to generate your own dynamic and realistic templates. | ||
title: Mockoon templates and AI assistants documentation | ||
description: All you need to know about Mockoon's mock API ready to use JSON templates and AI assistants to generate your own dynamic and realistic templates. | ||
order: 900 | ||
--- | ||
|
||
# Templates and AI assistant<span className='badge text-bg-warning fs-4 align-text-top ms-2'>PRO</span> | ||
# Templates and AI assistants<span className='badge text-bg-warning fs-4 align-text-top ms-2'>PRO</span> | ||
|
||
--- | ||
|
||
## Overview | ||
## JSON templates assistant | ||
|
||
Mockoon **templates** are pieces of JSON, often with [templating helpers](docs:templating/overview), that can be used in Mockoon to quickly prototype your mock APIs. They can be used in your [HTTP route's](docs:api-endpoints/routing#api-routes) body or as [data bucket](docs:data-buckets/overview) content to create realistic and dynamic data. | ||
|
||
Two types of templates are available: **pre-generated** and **AI-generated**. | ||
|
||
## Use the pre-generated templates | ||
### Use the pre-generated templates | ||
|
||
The pre-generated templates can be found in the desktop application. | ||
|
||
To use a template in your routes, click on the "From template" entry in the route creation menu to open the templates dialog: | ||
To use a template in your routes, click on the **"Assistants and templates"** entry in the route creation menu to open the templates dialog: | ||
|
||
![modal with templates list{440x304}](docs-img:pre-generated-templates-modal.png) | ||
![modal with templates list{498x304}](docs-img:pre-generated-templates-modal.png) | ||
|
||
Then, select the template you want to use and either copy-paste its content manually or click on one of the two buttons to create a new **GET endpoint** or a **CRUD endpoint with a data bucket**. | ||
|
||
![create get route from template{860x801}](docs-img:templates-create-get-route.png) | ||
|
||
The "GET route" button will create a new HTTP GET route and copy the template content as the body. The "CRUD + data" button will create a new CRUD endpoint with a linked data bucket and copy the template content as the data bucket content. | ||
|
||
> Starting with version 8.0.0 all the pre-generated templates are available for **free**. | ||
> 💡 Starting with version 8.0.0 all the pre-generated templates are available for **free**. | ||
## Use the AI assistant to generate realistic data | ||
### Use the AI assistant to generate realistic templates | ||
|
||
You can also use our AI assistant to generate realistic mock data for your various endpoints by providing a custom prompt. This feature is available in the desktop application and is part of the [Mockoon Pro](/pro/) plans. | ||
|
||
To generate a new template, click the "From template" button in the route creation menu (see above), and select the "Generate" tab: | ||
To generate a new template, click the **"Assistants and templates"** button in the route creation menu (see above), and select the "Generate JSON templates" tab: | ||
|
||
![AI assistant generate tab{860x801}](docs-img:ai-assistant-generate-template-tab.png) | ||
|
||
Then, write a prompt (e.g. "list of users") and click the "Generate" button. | ||
Then, **write a prompt** (e.g. "list of users") and click the "Generate" button. | ||
|
||
![AI assistant generate button click{860x801}](docs-img:ai-assistant-generate-button.png) | ||
|
||
Finally, you can copy-paste the generated template manually or click on one of the two buttons to create a new **GET endpoint** or a **CRUD endpoint with a data bucket**. | ||
|
||
![create get route from template{860x801}](docs-img:templates-generate-get-route.png) | ||
|
||
### Writing prompts | ||
### HTTP endpoints assistant | ||
|
||
Mockoon AI assistant wraps your prompt with various instructions to help you generate the most relevant template for your needs. It has been optimized for the JSON format but can also generate templates in XML, CSV, etc. | ||
Several options are available to fine-tune the generated templates: | ||
A second AI assistant is available in the [Mockoon Pro](/pro/) plans to generate **realistic HTTP endpoints**. This feature works similarly to the JSON templates assistant but generates a full HTTP route with a **response body**, a **path**, a **method** and a **documentation**, based on your prompt. | ||
|
||
- **JSON**: the generated template will be a valid JSON object. | ||
- **array**: the generated template root level will be a JSON array (usually used with the **JSON** option). | ||
- **templating**: the generated template will contain Handlebars [templating helpers](docs:templating/overview) (e.g. `{{faker 'person.firstName'}}`). Please note that disabling this option usually results in longer templates. | ||
To generate a new HTTP endpoint, click the **"Assistants and templates"** button in the route creation menu (see above), and select the "Generate HTTP endpoints" tab: | ||
|
||
![prompt options buttons{860x801}](docs-img:ai-assistant-template-generate-options.png) | ||
![AI assistant generate endpoint tab{860x801}](docs-img:ai-assistant-generate-endpoint-tab.png) | ||
|
||
Then, **write a prompt** (e.g. "Get a list of users") and click the "Generate" button. | ||
|
||
![AI assistant generate endpoint button click{860x801}](docs-img:ai-assistant-generate-endpoint-button.png) | ||
|
||
Finally, you can click on the **"Create HTTP route"** button to create a new endpoint from the generated data. | ||
|
||
![create full route from generated result{860x801}](docs-img:ai-assistant-generate-endpoint-create-button.png) | ||
|
||
## Writing prompts | ||
|
||
Mockoon AI assistants wrap your prompt with various instructions to help you generate the most relevant JSON templates or endpoints for your needs. It will **infer the structure** of the JSON you want to generate from your prompt (e.g. single object, array, etc.). You can enable or disable the use of Handlebars [templating helpers](docs:templating/overview) (e.g. `{{faker 'person.firstName'}}`) using the option next to the "Generate" button. | ||
|
||
![prompt templating option button{860x801}](docs-img:ai-assistant-template-generate-option.png) | ||
|
||
You will obtain best results with shorter prompts: "list of users", "JSON configuration for library X", etc. | ||
|
||
If you want more freedom when generating templates (using a different data format, etc.), you can disable the various options. Our system will still manage your prompt to increase the relevance of the generated template. | ||
We put a lot of effort into making the AI assistants as accurate as possible, but it may not always generate the expected results. If you encounter any issues, please let us know by [contacting us](/contact/). | ||
|
||
### AI assistant quota | ||
## AI assistants quota | ||
|
||
Each use of the AI assistant will count as one credit towards your monthly quota. You can check your quota in your [account page](/account/subscription/). | ||
Each use of the AI assistants will count as one credit towards your monthly quota. You can check your quota in your [account page](/account/subscription/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
content/docs/v5.0.0/server-configuration/serving-over-tls.md
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.