Funktionen und Operationen 5
The AI Chat Connector generates AI-based answers for user prompts.
Properties
| Defines the operation executed by the adapter. Possible values:
|
Parameters
| Main adapter class (do not change!) Possible values: de.softproject.integration.nativeadapter.NativeAdapter: Main class (Default) |
| The virtual repository of the adapter project. Possible values:
|
| Used AI gateway protocol (HTTP or HTTPS) Possible values:
|
| Name of the AI gateway host Possible values: Any valid character string without protocol specification (e.g. |
| (optional) Number of the AI gateway port Possible values: Any integer (e.g. |
| Is required to establish a Keycloak connection. Possible values: unique access token The access token needs to be generated in Keycloak. |
| Configuration key for the chat service. The key originates from a valid X4AI configuration in the system. Possible values: Any string Examples:
|
| Initial context or background information for the LLM (Large Language Model), usually a text file with an instruction in the Resources folder. Example contents of the text file:
Possible values:
Example:
|
callbackLog | Outputs information during execution, such as token consumption. |
Status values
| The operation was executed successfully. |
| The operation was executed successfully, but without result. |
| The operation failed due to a technical error. |
Input
The adapter expects an XML document with the following structure as input.
<x4ai_adapter>
<prompt>your prompt</prompt>
</x4ai_adapter>
The following elements are included in the input:
Element | Description |
|---|---|
| Enclosing element for the |
| Prompt or question, i.e. instruction to the AI |
Output
The adapter generates a XML document as output:
<output>
<response>AI Response</reponse>
<callback_log>
<total_tokens>30</total_tokens>
<completion_tokens>13</completion_tokens>
<prompt_tokens>17</prompt_tokens>
</callback_log>
</output>
The following elements can be contained in the output:
Element | Description |
|---|---|
| Contains the answer generated by the adapter. |
| Answer of the AI |
| Returns the token consumption during execution. Contains the elements:
|