From 15b1b0131d91a8b2ecc19d4e5d2d13658c629ad7 Mon Sep 17 00:00:00 2001 From: Ludovic Apvrille <ludovic.apvrille@telecom-paris.fr> Date: Wed, 30 Oct 2024 13:51:51 +0100 Subject: [PATCH] Adding help on mistralAI --- src/main/resources/help/ai.html | 19 +++++++++++++++++-- src/main/resources/help/ai.md | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/main/resources/help/ai.html b/src/main/resources/help/ai.html index ed297cc59..2ffa4181d 100644 --- a/src/main/resources/help/ai.html +++ b/src/main/resources/help/ai.html @@ -100,6 +100,10 @@ class="sourceCode xml"><code class="sourceCode xml"><span id="cb1-1"><a href="#c <span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><<span class="kw">OPENAIModel</span><span class="ot"> data=</span><span class="st">"gpt-3.5-turbo gpt-4-turbo gpt-4o gpt-4o-mini"</span>/></span></code></pre></div> <p>This is required to have a valid openai account and available tokens.</p> +<p>Similarly, you can use a mistralAI key.</p> +<div class="sourceCode" id="cb2"><pre +class="sourceCode xml"><code class="sourceCode xml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><<span class="kw">MistralAIKey</span><span class="ot"> data=</span><span class="st">"put your key here"</span>/></span> +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><<span class="kw">MistralAIModel</span><span class="ot"> data=</span><span class="st">"pixtral-12b-2409"</span>/></span></code></pre></div> <h2 id="how-to-use-ai">How to use AI?</h2> <p>First, select what you intend to do at the top of the AI window:</p> <h3 id="chat">Chat</h3> @@ -112,6 +116,17 @@ of requirements. Open a requirement diagram with at least one requirement, and click on “startâ€. If the classification proposed by the AI (see the “Answer text areaâ€) suits you, you can click on “Apply response†to update the opened requirement diagram.</p> +<h3 id="generate-block-diagrams">Generate block diagrams</h3> +<p>Provide a system specification. The AI will compute a liste of blocks +(including their atributes and signals), and will connect them. Once the +AI has finished computed a block diagram, click on “apply†to get the +block diagram drawn in TTool</p> +<h3 id="generate-state-machine-diagrams">Generate state machine +diagrams</h3> +<p>Provide a system specification, and select in TTool a block diagram. +The AI will compute states machines. Once computed, click on “apply†to +get the state machines drawn in TTool (TTool duplicated the block +diagram to be certain not to erase your former state machines).</p> <h3 id="aimulet">A(I)MULET</h3> <p>This option enables to automatically generate AMULET commands for modifying AVATAR models (AMULET is a language enabling the description @@ -126,7 +141,7 @@ opened AVATAR model.</p> <h3 id="capecs">CAPECs</h3> <p>To use CAPECs, you may need to position the path to the python version you wish to use. For instance:</p> -<div class="sourceCode" id="cb2"><pre -class="sourceCode xml"><code class="sourceCode xml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><<span class="kw">PythonPathForCapecs</span><span class="ot"> data=</span><span class="st">"/usr/bin/python3.10"</span> /></span></code></pre></div> +<div class="sourceCode" id="cb3"><pre +class="sourceCode xml"><code class="sourceCode xml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><<span class="kw">PythonPathForCapecs</span><span class="ot"> data=</span><span class="st">"/usr/bin/python3.10"</span> /></span></code></pre></div> </body> </html> diff --git a/src/main/resources/help/ai.md b/src/main/resources/help/ai.md index e1248215f..92b0fa45c 100644 --- a/src/main/resources/help/ai.md +++ b/src/main/resources/help/ai.md @@ -9,6 +9,13 @@ TTool must first be configured before using AI. Add the following information to ``` This is required to have a valid openai account and available tokens. +Similarly, you can use a mistralAI key. +```xml +<MistralAIKey data="put your key here"/> +<MistralAIModel data="pixtral-12b-2409"/> +``` + + ## How to use AI? First, select what you intend to do at the top of the AI window: @@ -21,6 +28,13 @@ Enter your question in the "Question" textarea, and click on "Start" ### Classify requirements This options intends to automatically identify the "kind" attributes of requirements. Open a requirement diagram with at least one requirement, and click on "start". If the classification proposed by the AI (see the "Answer text area") suits you, you can click on "Apply response" to update the opened requirement diagram. +### Generate block diagrams +Provide a system specification. The AI will compute a liste of blocks (including their atributes and signals), and will connect them. Once the AI has finished computed a block diagram, click on "apply" to get the block diagram drawn in TTool + +### Generate state machine diagrams +Provide a system specification, and select in TTool a block diagram. The AI will compute states machines. Once computed, click on "apply" to get the state machines drawn in TTool (TTool duplicated the block diagram to be certain not to erase your former state machines). + + ### A(I)MULET This option enables to automatically generate AMULET commands for modifying AVATAR models (AMULET is a language enabling the description of AVATAR -- GitLab