Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
712:ai_configuration [2026/03/02 14:15] – Doczkal, Tristan712:ai_configuration [2026/10/20 13:36] (current) – Doczkal, Tristan
Line 1: Line 1:
-====== AI Configuration ====== +====== AI Feature Configuration: Chatbot Assistant and Content Generation ======
-===== AI Feature Configuration: Chatbot Assistant and Content Generation =====+
  
-Content generation must always be configured to use the AI features, while the chatbot itself is optional. However, if the chatbot is used, it requires content generation to be configured first.+To activate the AI chatbot and the content generation feature in Stages, the following steps are required. 
 + 
 +**The content generation feature needs to be configured to use the chatbot feature. The chatbot feature configuration is arbitrary - the content generation feature can be used without the chatbot feature.**
  
 ==== Stages version ==== ==== Stages version ====
  
-The chatbot will only work with Stages v7.12 or higher while the content generation feature works with Stages v7.11 or higher.+**Chatbot** requires Stages v7.12 or higher. 
 + 
 +**Content generation** requires Stages v7.11 or higher.
  
 ==== Metamodel ==== ==== Metamodel ====
  
-A new unified configuration metamodel for Stages v7.12 / v.7.11 is required to support the AI features. Please contact [[[email protected]]] for further metamodel update instructions - depending on your Stages version and server operating system. If you use a customized metamodel, please contact your Stages product consultant to extend your metamodel.+A new unified configuration metamodel for Stages v7.12 / v.7.11 is required to support the AI features. Please contact [[[email protected]]] for further metamodel update instructions - depending on your Stages version and server operating system.  
 + 
 +If you use a customized metamodel, please contact your Stages product consultant to extend your metamodel.
  
 ==== User permissions ==== ==== User permissions ====
Line 141: Line 146:
 </cg> </cg>
 </code> </code>
 +
 +**When using models newer than gpt4o (like gpt5)**
 +
 +>The temperature has to be adjusted to the default value of 1. Add <cg-property name="temperature" value="1" /> to the relevant <cg-hosts>
 +
 +>The <chatbot-property name="maxTokens" value="500"></chatbot-property> has to be replaced with <chatbot-property name="maxCompletionTokens" value="500"></chatbot-property>
  
 **AI content generation feature (OpenAI compatible):** **AI content generation feature (OpenAI compatible):**
Line 152: Line 163:
   * If run on consumer hardware, it will probably be necessary to increase the default timeout.   * If run on consumer hardware, it will probably be necessary to increase the default timeout.
  
-<code xml>+<code ->
 <cg> <cg>
     <cg-type name="openAICompatible">     <cg-type name="openAICompatible">
Line 234: Line 245:
   ai.model.url = [azure_ai_ressource_url]   ai.model.url = [azure_ai_ressource_url]
   ai.model.key = [azure_ai_ressource_key]   ai.model.key = [azure_ai_ressource_key]
-  ai.security.user = [custom_name_to_identify_stages_to_azure]+  ai.security.user = [arbitrary_custom_name_to_identify_stages_to_azure]
  
   ai.translateservice.url = [azure_translate_service_url]   ai.translateservice.url = [azure_translate_service_url]
Line 247: Line 258:
 Please stop the Stages service after saving the changes, run the update.bat or .sh script located under /methodpark/stages/bin/ and restart Stages. Please stop the Stages service after saving the changes, run the update.bat or .sh script located under /methodpark/stages/bin/ and restart Stages.
  
-===== How to create Azure OpenAI services =====+===== AI Feature Configuration: How to create Azure OpenAI services =====
  
-Please follow the linked instructions to create the needed AI ressources/models. This will get you the needed URLs for the configuration.  +1. Login to Azure-Management-Portal and navigate to "Azure OpenAI" service:\\ \\  {{ :712:create_azure_openai_services_01.jpg?400&direct }}\\  2. Create a new service within the OpenAI service:\\ \\  {{ :712:create_azure_openai_services_02.jpg?400&direct }}\\  3. Define basic information for the resource - e.g. select region:\\ \\  {{ :712:create_azure_openai_services_03.jpg?400&direct }}\\  4. Create resource: click "Create":\\ \\  {{ :712:create_azure_openai_services_04.jpg?400&direct }}\\  5. Select resource and navigate to "AI Foundry portal". Required AI models need to be configured here:\\ \\  {{ :712:create_azure_openai_services_05.jpg?400&direct }}\\  6. Within "AI foundry portal" these three models need to be deployed:\\ \\  {{ :712:create_azure_openai_services_06.jpg?400&direct }}\\  {{ :712:create_azure_openai_services_07.jpg?400&direct }}\\  7. Within the resource navigate to "Keys and Endpoints":\\ \\  {{ :712:create_azure_openai_services_08.jpg?200&direct }}\\  8. Here the required access data for Stages can be exported (URL, Key):\\ \\  {{ :712:create_azure_openai_services_09.jpg?400&direct }}\\  9. Afterwards create another resource for the translator-services:\\ \\  {{ :712:create_azure_openai_services_10.jpg?400&direct }}\\  {{ :712:create_azure_openai_services_11.jpg?400&direct }}\\  10. Define name and region:\\ \\  {{ :712:create_azure_openai_services_12.jpg?400&direct }}\\  11. Leave system-identitiy-switch turned "off":\\ \\  {{ :712:create_azure_openai_services_13.jpg?400&direct }}\\  12. Create resource: click "Create":\\ \\  {{ :712:create_azure_openai_services_14.jpg?400&direct }}\\  13. Export Stages access data (Key, Endpoint):\\ \\  {{ :712:create_azure_openai_services_15.jpg?400&direct }}\\  If you want to check if Stages can reach your AI resources please execute the command below in a command shell on the server that Stages is installed on:
- +
-**[[:712:ai_configuration:create_openai_services|Creat OpenAI services]]** +
- +
-If you want to check if Stages can reach your AI resources please execute the command below in a command shell on the server that Stages is installed on:+
  
 Linux: Linux:
Line 306: Line 313:
 ===== AI Feature Tokenizer Configuration ===== ===== AI Feature Tokenizer Configuration =====
  
-LLM that are NOT using the standard byte-pair-encoding algorithm CANNOT be used with the Azure tokenizer. Stages implements the HuggingFaceTokenizer from deep java library to support customized tokenizer.+>Attention - Introduced with 7.12.8.1: \\ If openAiCompatible Adapter is used and no Tokenizer is provided via the conf folder, Stages falls back to a generic o200k based Tokenizer that is suitable for most of the late openAi compatible models. 
 + 
 +LLM that are NOT using the standard byte-pair-encoding algorithm or are provided via the openAICompatible adapter CANNOT be used with the Azure tokenizer. Stages implements the HuggingFaceTokenizer from deep java library to support customized tokenizer.
  
 Add the property “tokenizerFolder” to the cg-host section Add the property “tokenizerFolder” to the cg-host section
Line 315: Line 324:
   </cg-host>   </cg-host>
  
- In methodpark\stages\conf+In methodpark\stages\conf
  
 Create a folder tokenizer\custom-model-v1 ← make sure the folder name exactly matches the value in the tokenizerFolder property Create a folder tokenizer\custom-model-v1 ← make sure the folder name exactly matches the value in the tokenizerFolder property
Line 325: Line 334:
 1. cg-host configuration in config.xml 1. cg-host configuration in config.xml
  
-<code xml>+<code ->
 <cg-type name="openAICompatible"> <cg-type name="openAICompatible">
  <cg-host ident="training-model" url="${ai.model.url}" displayName="DeepSeek V3.2 for Chat">  <cg-host ident="training-model" url="${ai.model.url}" displayName="DeepSeek V3.2 for Chat">
Line 339: Line 348:
 >You need to change all chatbot steps that shall use the configured LLM >You need to change all chatbot steps that shall use the configured LLM
  
-<code xml>+<code ->
 default: default:
 <chatbot-step ident="summaries" type="azureOpenAI" host="gpt-4o-mini"> <chatbot-step ident="summaries" type="azureOpenAI" host="gpt-4o-mini">
Line 417: Line 426:
 } }
 </code> </code>
- 
-