- Description:
The helper module or AI Subsystem.
- Source:
- Copyright:
- 2024 Huong Nguyen
- 2024 Huong Nguyen
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
The helper module or AI Subsystem.
Methods
(static) formatResponse(text) → {String}
- Description:
Format the response provided by the AI model.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
String | The text to format. |
Returns:
- Type
- String
(static) replaceLineBreaks(text) → {String}
- Description:
Replace double line breaks with
and withfor paragraphs. This is to handle the difference in response from the AI to what is expected by the editor.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
String | The text to replace. |
Returns:
- Type
- String
(static) replaceMarkdown(text) → {String}
- Description:
Replace markdown formatting. Even when asked not to, AI models will sometimes return markdown.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
text |
String | The text to replace. |
Returns:
- Type
- String