From 073ad6ee05f49d4a290c306a235a1269bdc4ac38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Thu, 6 Feb 2025 12:45:22 +0100 Subject: [PATCH 1/9] [REST] New AI endpoints --- .../action-types/GET/ActionType.json.example | 14 + .../action-types/GET/ActionType.xml.example | 12 + .../GET/ActionTypeList.json.example | 36 + .../GET/ActionTypeList.xml.example | 28 + .../GET/ActionConfiguration.json.example | 25 + .../GET/ActionConfiguration.xml.example | 22 + .../GET/ActionConfigurationList.json.example | 218 + .../GET/ActionConfigurationList.xml.example | 195 + .../ActionConfigurationListInput.json.example | 9 + .../ActionConfigurationListInput.xml.example | 6 + .../execute}/POST/AltText.json.example | 0 .../execute}/POST/AltText.xml.example | 0 .../POST/GenerateAltText.json.example | 0 .../execute}/POST/GenerateAltText.xml.example | 0 .../execute}/POST/RefineText.json.example | 0 .../execute}/POST/RefineText.xml.example | 0 .../POST/RefineTextInput.json.example | 0 .../execute}/POST/RefineTextInput.xml.example | 0 .../rest_api_reference/input/ibexa-ai.raml | 147 +- .../rest_api_reference/input/ibexa-types.raml | 113 +- .../rest_api_reference/input/ibexa.raml | 2 +- .../rest_api_reference.html | 4019 +++++++++++++++-- 22 files changed, 4577 insertions(+), 269 deletions(-) create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.json.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.xml.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.json.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.xml.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.json.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.xml.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.json.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.xml.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.json.example create mode 100644 docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.xml.example rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/AltText.json.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/AltText.xml.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/GenerateAltText.json.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/GenerateAltText.xml.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/RefineText.json.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/RefineText.xml.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/RefineTextInput.json.example (100%) rename docs/api/rest_api/rest_api_reference/input/examples/ai/{ => actions/execute}/POST/RefineTextInput.xml.example (100%) diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.json.example new file mode 100644 index 0000000000..c7871342ba --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.json.example @@ -0,0 +1,14 @@ +{ + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "generate_alt_text", + "name": "Generate alternative text", + "inputIdentifier": "image", + "outputIdentifier": "text", + "options": { + "width": 512, + "height": 512, + "image_quality": 85 + } + } +} diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.xml.example new file mode 100644 index 0000000000..915ea44886 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.xml.example @@ -0,0 +1,12 @@ + + + generate_alt_text + Generate alternative text + image + text + + 512 + 512 + 85 + + diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.json.example new file mode 100644 index 0000000000..3ab5d6ffa8 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.json.example @@ -0,0 +1,36 @@ +{ + "ActionTypeList": { + "_media-type": "application/vnd.ibexa.api.ai.ActionTypeList+json", + "_href": "/api/ibexa/v2/ai/action-types", + "ActionType": [ + { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "transcribe_audio", + "name": "Transcribe audio", + "inputIdentifier": "audio", + "outputIdentifier": "text", + "options": {} + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "generate_alt_text", + "name": "Generate alternative text", + "inputIdentifier": "image", + "outputIdentifier": "text", + "options": { + "width": 512, + "height": 512, + "image_quality": 85 + } + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + } + ] + } +} diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.xml.example new file mode 100644 index 0000000000..07846e0ede --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.xml.example @@ -0,0 +1,28 @@ + + + + transcribe_audio + Transcribe audio + audio + text + + + + generate_alt_text + Generate alternative text + image + text + + 512 + 512 + 85 + + + + refine_text + Refine text + text + text + + + diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.json.example new file mode 100644 index 0000000000..23317700f0 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.json.example @@ -0,0 +1,25 @@ +{ + "ActionConfiguration": { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "expand_text", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Expand the given text by 25%. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + } +} diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.xml.example new file mode 100644 index 0000000000..2d75faf888 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.xml.example @@ -0,0 +1,22 @@ + + + expand_text + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Expand the given text by 25%. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.json.example new file mode 100644 index 0000000000..8c6e9ec290 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.json.example @@ -0,0 +1,218 @@ +{ + "ActionConfigurationList": { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfigurationList+json", + "_href": "/api/ibexa/v2/ai/actions", + "ActionConfiguration": [ + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "proofread_llamafile", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "LLaVATextToText", + "ActionHandlerOptions": { + "system_prompt": "Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information." + }, + "CreatedAt": "2024-12-30T09:57:02+00:00", + "UpdatedAt": "2024-12-30T09:57:02+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "rewrite_with_friendly_tone", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Rewrite text in friendly tone. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "rewrite_with_professional_tone", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Rewrite text in professional tone. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "summarize_text", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Summarize text into one sentence. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "expand_text", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Expand the given text by 25%. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "shorten_text", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Shorten the given text by 25%. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "proofread", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "improve_readability", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "refine_text", + "name": "Refine text", + "inputIdentifier": "text", + "outputIdentifier": "text", + "options": {} + }, + "ActionTypeOptions": {}, + "ActionHandlerIdentifier": "openai-text-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "Rewrite this content to improve readability. Preserve meaning and crucial information.", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + }, + { + "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", + "Identifier": "gen_alt_text", + "Enabled": true, + "ActionType": { + "_media-type": "application/vnd.ibexa.api.ai.ActionType+json", + "identifier": "generate_alt_text", + "name": "Generate alternative text", + "inputIdentifier": "image", + "outputIdentifier": "text", + "options": { + "width": 512, + "height": 512, + "image_quality": 85 + } + }, + "ActionTypeOptions": { + "max_length": 140 + }, + "ActionHandlerIdentifier": "openai-image-to-text", + "ActionHandlerOptions": { + "max_tokens": 4000, + "temperature": 1, + "prompt": "", + "model": "gpt-4-turbo" + }, + "CreatedAt": "2024-12-09T09:02:44+00:00", + "UpdatedAt": "2024-12-09T09:02:44+00:00" + } + ] + } +} diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.xml.example new file mode 100644 index 0000000000..d126573d2d --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.xml.example @@ -0,0 +1,195 @@ + + + + proofread_llamafile + 1 + + refine_text + Refine text + text + text + + + + LLaVATextToText + + Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information. + + 2024-12-30T09:57:02+00:00 + 2024-12-30T09:57:02+00:00 + + + rewrite_with_friendly_tone + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Rewrite text in friendly tone. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + rewrite_with_professional_tone + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Rewrite text in professional tone. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + summarize_text + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Summarize text into one sentence. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + expand_text + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Expand the given text by 25%. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + shorten_text + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Shorten the given text by 25%. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + proofread + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + improve_readability + 1 + + refine_text + Refine text + text + text + + + + openai-text-to-text + + 4000 + 1 + Rewrite this content to improve readability. Preserve meaning and crucial information. + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + + gen_alt_text + 1 + + generate_alt_text + Generate alternative text + image + text + + 512 + 512 + 85 + + + + 140 + + openai-image-to-text + + 4000 + 1 + + gpt-4-turbo + + 2024-12-09T09:02:44+00:00 + 2024-12-09T09:02:44+00:00 + + diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.json.example new file mode 100644 index 0000000000..ae2ce51516 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.json.example @@ -0,0 +1,9 @@ +{ + "ActionConfigurationListInput": { + "query": "Proofread", + "action_type_identifier": "refine_text", + "enabled": true, + "limit": 10, + "page": 1 + } +} diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.xml.example new file mode 100644 index 0000000000..c4e54d4dc9 --- /dev/null +++ b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/POST/ActionConfigurationListInput.xml.example @@ -0,0 +1,6 @@ + + Proofread + refine_text + 10 + 1 + diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/AltText.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/AltText.json.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/AltText.json.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/AltText.json.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/AltText.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/AltText.xml.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/AltText.xml.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/AltText.xml.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/GenerateAltText.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/GenerateAltText.json.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/GenerateAltText.json.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/GenerateAltText.json.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/GenerateAltText.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/GenerateAltText.xml.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/GenerateAltText.xml.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/GenerateAltText.xml.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineText.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineText.json.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineText.json.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineText.json.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineText.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineText.xml.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineText.xml.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineText.xml.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineTextInput.json.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineTextInput.json.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineTextInput.json.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineTextInput.json.example diff --git a/docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineTextInput.xml.example b/docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineTextInput.xml.example similarity index 100% rename from docs/api/rest_api/rest_api_reference/input/examples/ai/POST/RefineTextInput.xml.example rename to docs/api/rest_api/rest_api_reference/input/examples/ai/actions/execute/POST/RefineTextInput.xml.example diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-ai.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-ai.raml index 9ee155eeaf..01f69f8735 100644 --- a/docs/api/rest_api/rest_api_reference/input/ibexa-ai.raml +++ b/docs/api/rest_api/rest_api_reference/input/ibexa-ai.raml @@ -1,5 +1,5 @@ -displayName: AI Actions -/execute/{actionConfiguration}: +displayName: AI actions +/actions/execute/{actionConfiguration}: post: displayName: Execute AI Action description: Executes an AI action using the specified Action Configuration identifier. @@ -21,35 +21,162 @@ displayName: AI Actions body: application/vnd.ibexa.api.ai.AltText+json: type: GenerateAltTextWrapper - example: !include examples/ai/POST/GenerateAltText.json.example + example: !include examples/ai/actions/execute/POST/GenerateAltText.json.example application/vnd.ibexa.api.ai.AltText+xml: type: GenerateAltTextWrapper - example: !include examples/ai/POST/GenerateAltText.xml.example + example: !include examples/ai/actions/execute/POST/GenerateAltText.xml.example application/vnd.ibexa.api.ai.RefineText+json: type: RefineTextInputWrapper - example: !include examples/ai/POST/RefineTextInput.json.example + example: !include examples/ai/actions/execute/POST/RefineTextInput.json.example application/vnd.ibexa.api.ai.RefineText+xml: type: RefineTextInputWrapper - example: !include examples/ai/POST/RefineTextInput.xml.example + example: !include examples/ai/actions/execute/POST/RefineTextInput.xml.example responses: 200: description: Action executed successfuly body: application/vnd.ibexa.api.ai.AltText+json: type: AltTextWrapper - example: !include examples/ai/POST/AltText.json.example + example: !include examples/ai/actions/execute/POST/AltText.json.example application/vnd.ibexa.api.ai.AltText+xml: type: AltTextWrapper - example: !include examples/ai/POST/AltText.xml.example + example: !include examples/ai/actions/execute/POST/AltText.xml.example application/vnd.ibexa.api.ai.RefineText+json: type: RefineTextWrapper - example: !include examples/ai/POST/RefineText.json.example + example: !include examples/ai/actions/execute/POST/RefineText.json.example application/vnd.ibexa.api.ai.RefineText+xml: type: RefineTextWrapper - example: !include examples/ai/POST/RefineText.xml.example + example: !include examples/ai/actions/execute/POST/RefineText.xml.example 400: description: Error - the request is invalid 401: description: Error - the user is not authorized to execute an AI action. 404: description: Error - the given Action Configuration identifier does not exist + +/actions: + get: + displayName: List action configurations + description: Returns a list of action configurations + queryParameters: + limit: + description: The number of results per page + type: integer + page: + description: The page for which the results should be returned + type: integer + default: 1 + enabled: + description: Return only enabled (1) or disabled (0) action configurations + type: integer + action_type_identifier: + description: Return action configurations for the specified action type identifier + type: string + query: + type: string + description: Return action configurations with identifier matching the given value, or the name starting with given value + headers: + Accept: + description: If set, the list is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.ai.ActionConfigurationList+json + application/vnd.ibexa.api.ai.ActionConfigurationList+xml + responses: + 200: + body: + application/vnd.ibexa.api.ai.ActionConfigurationList+json: + type: ActionConfigurationListWrapper + example: !include examples/ai/actions/GET/ActionConfigurationList.json.example + application/vnd.ibexa.api.ai.ActionConfigurationList+xml: + type: ActionConfigurationListWrapper + example: !include examples/ai/actions/GET/ActionConfigurationList.xml.example + post: + displayName: List action configurations (POST) + description: Returns a list of action configurations, the same data as the GET endpoint. + headers: + Accept: + description: Specifies the expected response type. If set, the list is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.ai.ActionConfigurationList+json + application/vnd.ibexa.api.ai.ActionConfigurationList+xml + Content-Type: + description: Specifies the input type. + example: | + application/vnd.ibexa.api.ai.ActionConfigurationListInput+json + application/vnd.ibexa.api.ai.ActionConfigurationListInput+xml + body: + application/vnd.ibexa.api.ai.ActionConfigurationListInput+json: + type: ActionConfigurationListInputWrapper + example: !include examples/ai/actions/POST/ActionConfigurationListInput.json.example + application/vnd.ibexa.api.ai.ActionConfigurationListInput+xml: + type: ActionConfigurationListInputWrapper + example: !include examples/ai/actions/POST/ActionConfigurationListInput.xml.example + responses: + 200: + body: + application/vnd.ibexa.api.ai.ActionConfigurationList+json: + type: ActionConfigurationListWrapper + example: !include examples/ai/actions/GET/ActionConfigurationList.json.example + application/vnd.ibexa.api.ai.ActionConfigurationList+xml: + type: ActionConfigurationListWrapper + example: !include examples/ai/actions/GET/ActionConfigurationList.xml.example + + /{identifier}: + get: + displayName: Get an action configuration + description: Returns an action configuration with specified identifier. + headers: + Accept: + description: If set, the list is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.ai.ActionConfiguration+json + application/vnd.ibexa.api.ai.ActionConfiguration+xml + responses: + 200: + body: + application/vnd.ibexa.api.ai.ActionConfigurationList+json: + type: ActionConfiguration + example: !include examples/ai/actions/GET/ActionConfiguration.json.example + application/vnd.ibexa.api.ai.ActionConfigurationList+xml: + type: ActionConfiguration + example: !include examples/ai/actions/GET/ActionConfiguration.xml.example + +/action-types: + get: + displayName: List action types + description: Returns a list of AI action types. + headers: + Accept: + description: If set, the list is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.ai.ActionTypeList+json + application/vnd.ibexa.api.ai.ActionTypeList+xml + responses: + 200: + body: + application/vnd.ibexa.api.ai.ActionTypeList+json: + type: ActionTypeListWrapper + example: !include examples/ai/action-types/GET/ActionTypeList.json.example + application/vnd.ibexa.api.ai.ActionTypeList+xml: + type: ActionTypeListWrapper + example: !include examples/ai/action-types/GET/ActionTypeList.xml.example + + /{identifier}: + get: + displayName: Get action type + description: Returns the AI action type with given identifier. + headers: + Accept: + description: If set, the list is returned in XML or JSON format. + example: | + application/vnd.ibexa.api.ai.ActionType+json + application/vnd.ibexa.api.ai.ActionType+xml + responses: + 200: + body: + application/vnd.ibexa.api.ai.ActionType+json: + type: ActionType + example: !include examples/ai/action-types/GET/ActionType.json.example + application/vnd.ibexa.api.ai.ActionType+xml: + type: ActionType + example: !include examples/ai/action-types/GET/ActionType.xml.example diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml b/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml index 5f94961bfb..8d153fca5a 100644 --- a/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml +++ b/docs/api/rest_api/rest_api_reference/input/ibexa-types.raml @@ -45,7 +45,7 @@ assetMetadata: description: 'Asset metadata object. Depending on the provider, it can contain different parameters.' properties: alternativeText: - type: datetime + type: string description: 'Alternative text for the image asset' width: type: integer @@ -6134,7 +6134,7 @@ AltTextWrapper: type: object properties: _media-type: - string: type + type: string Text: type: object properties: @@ -6142,3 +6142,112 @@ AltTextWrapper: type: string text: type: string[] +ActionTypeListWrapper: + type: object + properties: + ActionTypeList: + type: ActionTypeList + +ActionTypeList: + type: object + properties: + _media-type: + type: string + xml: + attribute: true + name: media-type + _href: + type: string + xml: + attribute: true + name: href + ActionType: + type: ActionType[] + +ActionType: + type: object + propeties: + _media-type: + type: string + xml: + attribute: true + name: media-type + identifier: + type: string + name: + type: string + inputIdentifier: + type: string + outputIdentifier: + type: string + options: + type: object + +ActionConfigurationListInput: + type: object + properties: + query: + type: string + action_type_identifier: + type: string + enabled: + type: boolean + limit: + type: integer + page: + type: integer + +ActionConfigurationListInputWrapper: + type: object + properties: + ActionConfigurationListInput: + type: ActionConfigurationListInput + + +ActionConfigurationListWrapper: + type: object + properties: + ActionConfigurationList: + type: ActionConfigurationList + +ActionConfigurationList: + type: object + properties: + _media-type: + type: string + xml: + attribute: true + name: media-type + _href: + type: string + xml: + attribute: true + name: href + ActionConfiguration: + type: ActionConfiguration[] + +ActionConfiguration: + type: object + properties: + _media-type: + type: string + xml: + attribute: true + name: media-type + Identifier: + type: string + Enabled: + type: boolean + ActionType: + type: ActionType + ActionTypeOptions: + type: object + ActionHandlerIdentifier: + type: string + ActionHandlerOptions: + type: object + CreatedAt: + type: datetime + UpdatesAt: + type: datetime + diff --git a/docs/api/rest_api/rest_api_reference/input/ibexa.raml b/docs/api/rest_api/rest_api_reference/input/ibexa.raml index 7a15794f58..04e4912a7e 100644 --- a/docs/api/rest_api/rest_api_reference/input/ibexa.raml +++ b/docs/api/rest_api/rest_api_reference/input/ibexa.raml @@ -79,6 +79,6 @@ baseUri: ../rest_api_usage/rest_api_usage/ /activity-log-group: !include ibexa-activityloggroup.raml -/ai/action: !include ibexa-ai.raml +/ai: !include ibexa-ai.raml types: !include ibexa-types.raml diff --git a/docs/api/rest_api/rest_api_reference/rest_api_reference.html b/docs/api/rest_api/rest_api_reference/rest_api_reference.html index 307914e2bd..7d21f27cc1 100644 --- a/docs/api/rest_api/rest_api_reference/rest_api_reference.html +++ b/docs/api/rest_api/rest_api_reference/rest_api_reference.html @@ -134391,12 +134391,15 @@
Types

- AI Actions + AI actions ΒΆ

-
+
+

/ai/actions/execute/{actionConfiguration}

+
+
-

/ai/action/execute/{actionConfiguration}

+

/ai/actions/execute/{actionConfiguration}

-
+
/ai/

POST - /ai/action/execute/{actionConfiguration} + /ai/actions/execute/{actionConfiguration}

Executes an AI action using the specified Action Configuration identifier.

@@ -134520,7 +134523,7 @@
Possible responses
-
200 @@ -134610,28 +134613,28 @@
Types
-
+
-
-
-
+
+

file_copy

-
+                            
                                 {
     "GenerateAltText": {
         "Image": {
@@ -134663,17 +134666,17 @@ 
Types
- View more + View more

file_copy

-
+                            
                                 {
     "RefineText": {
         "Text": {
@@ -134685,20 +134688,20 @@ 
Types
- View more + View more
-
+

file_copy

-
+                            
                                 <?xml version="1.0" encoding="UTF-8"?>
 <GenerateAltText xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <Image>
@@ -134709,17 +134712,17 @@ 
Types
- View more + View more

file_copy

-
+                            
                                 <?xml version="1.0" encoding="UTF-8"?>
 <RefineText xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <Text>
@@ -134730,15 +134733,15 @@ 
Types
- View more + View more
- +
+
+
+
+ +
+ Code: 200 +
+
+
+
+
+
+

+ file_copy + +

+
+                                {
+    "AltText": {
+        "_media-type": "application/vnd.ibexa.api.ai.AltText+json",
+        "Text": {
+            "_media-type": "application/vnd.ibexa.api.ai.Text+json",
+            "text": [
+                "A close-up of a fluffy orange and white cat peacefully grooming itself, its eyes closed and tongue extended. The background is blurred with soft green tones, creating a serene atmosphere."
+            ]
+        }
+    }
+}
+
+                            
+
+ View more +
+

+ file_copy + +

+
+                                {
+    "RefineText": {
+        "_media-type": "application/vnd.ibexa.api.ai.RefineText+json",
+        "Text": {
+            "_media-type": "application/vnd.ibexa.api.ai.Text+json",
+            "text": [
+                "Here are some of the fastest animals on earth:\n\n1. Peregrine Falcon: Known for its incredible diving speeds, the peregrine falcon can reach speeds of over 240 miles per hour while hunting its prey.\n\n2. Cheetah: With its sleek build and powerful legs, the cheetah is the fastest land animal, reaching speeds of up to 70 miles per hour in short bursts.\n\n3. Sailfish: Considered the fastest swimmer in the ocean, the sailfish can reach speeds of up to 68 miles per hour while hunting for fish.\n\n4. Pronghorn Antelope: Native to North America, the pronghorn antelope is the fastest land mammal in the Western Hemisphere, capable of running at speeds of up to 60 miles per hour.\n\n5. Black Marlin: One of the fastest fish in the sea, the black marlin can swim at speeds of up t
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                <?xml version="1.0" encoding="UTF-8"?>
+<AltText media-type="application/vnd.ibexa.api.ai.AltText+xml">
+    <Text media-type="application/vnd.ibexa.api.ai.Text+xml">
+        <text>A fluffy orange and white cat is lounging while gently licking its paw. The cat's eyes are closed and it appears relaxed, with a soft focus background.</text>
+    </Text>
+</AltText>
+
+                            
+
+ View more +
+

+ file_copy + +

+
+                                <?xml version="1.0" encoding="UTF-8"?>
+<RefineText media-type="application/vnd.ibexa.api.ai.RefineText+xml">
+    <Text media-type="application/vnd.ibexa.api.ai.Text+xml">
+        <text>Here are some of the fastest animals on earth, demonstrating incredible speed and agility in their natural habitats. The cheetah holds the title for the fastest land animal, reaching speeds of up to 70 miles per hour in short bursts. The peregrine falcon is the fastest bird, diving at speeds of over 240 miles per hour while hunting for prey. In the water, the sailfish is known for its impressive speed, swimming at up to 68 miles per hour to catch fish. These animals have adapted to their environments, using their speed to survive and thrive in the wild.</text>
+    </Text>
+</RefineText>
+
+                            
+
+ View more +
+
+
+ +
+
+
+
+
+
+

/ai/actions

+
+
+
+

/ai/actions

+ +
+
+
+
+
+
+ List action configurations + ΒΆ +
+
+
+

+ GET + /ai/actions +

+

Returns a list of action configurations

+

+
+
Header parameters
+
+

Accept

+

If set, the list is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + + + +
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.ai.ActionConfigurationList+json +application/vnd.ibexa.api.ai.ActionConfigurationList+xml + +
+
+
+
+ +
+
Query parameters
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyTypeValue
+ limit + + + + integer + + + + + +

The number of results per page

+ +
+ page + + + + integer + + + + + +

The page for which the results should be returned

+ +
+ enabled + + + + integer + + + + + +

Return only enabled (1) or disabled (0) action configurations

+ +
+ action_type_identifier + + + + string + + + + + +

Return action configurations for the specified action type identifier

+ +
+ query + + + + string + + + + + +

Return action configurations with identifier matching the given value, or the name starting with given value

+ +
+
+
+ +
+
Possible responses
+
+ + + + + + + + + + + + + +
CodeDescription
+ + 200 + + +

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + +
TypeDescription
+ + ActionConfigurationListWrapper + +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ Code: 200 +
+
+
+
+
+
+

+ file_copy + +

+
+                                {
+    "ActionConfigurationList": {
+        "_media-type": "application/vnd.ibexa.api.ai.ActionConfigurationList+json",
+        "_href": "/api/ibexa/v2/ai/actions",
+        "ActionConfiguration": [
+            {
+                "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
+                "Identifier": "proofread_llamafile",
+                "Enabled": true,
+                "ActionType": {
+                    "_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
+                    "identifier": "refine_text",
+                    "name": "Refine text",
+                    "inputIdentifier": "text",
+                    "outputIdentifier": "text",
+                    "options": {}
+                },
+                "ActionTypeOptions": {},
+                "ActionHandlerIdentifier": "LLaVATextToText",
+                "ActionHandlerOptions": {
+                    "system_prompt": "Rewrite given text to identify and fix grammatical and punctuation errors. Pr
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                <?xml version="1.0" encoding="UTF-8"?>
+<ActionConfigurationList media-type="application/vnd.ibexa.api.ai.ActionConfigurationList+xml" href="/api/ibexa/v2/ai/actions">
+    <ActionConfiguration media-type="application/vnd.ibexa.api.ai.ActionConfiguration+xml">
+        <Identifier>proofread_llamafile</Identifier>
+        <Enabled>1</Enabled>
+        <ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
+            <identifier>refine_text</identifier>
+            <name>Refine text</name>
+            <inputIdentifier>text</inputIdentifier>
+            <outputIdentifier>text</outputIdentifier>
+            <options/>
+        </ActionType>
+        <ActionTypeOptions/>
+        <ActionHandlerIdentifier>LLaVATextToText</ActionHandlerIdentifier>
+        <ActionHandlerOptions>
+            <system_prompt>Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information.</system_prompt>
+        </ActionHandlerOptions>
+        <CreatedA
+                            
+
+ View more +
+
+
+ +
+
+
+
+
+
+
+
+
+ List action configurations (POST) + ΒΆ +
+
+
+

+ POST + /ai/actions +

+

Returns a list of action configurations, the same data as the GET endpoint.

+

+
+
Header parameters
+
+

Accept

+

Specifies the expected response type. If set, the list is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + + + +
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.ai.ActionConfigurationList+json +application/vnd.ibexa.api.ai.ActionConfigurationList+xml + +
+
+
+
+

Content-Type

+

Specifies the input type.

+
+ + + + + + + + + + + + + + + + + +
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.ai.ActionConfigurationListInput+json +application/vnd.ibexa.api.ai.ActionConfigurationListInput+xml + +
+
+
+
+ + +
+
Possible responses
+
+ + + + + + + + + + + + + +
CodeDescription
+ + 200 + + +

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + + + + + +
TypeDescription
+ + ActionConfigurationListInputWrapper + +
+ + ActionConfigurationListWrapper + +
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+
+

+ file_copy + +

+
+                                {
+    "ActionConfigurationListInput": {
+        "query": "Proofread",
+        "action_type_identifier": "refine_text",
+        "enabled": true,
+        "limit": 10,
+        "page": 1
+    }
+}
+
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                <ActionConfigurationListInput media-type="application/vnd.ibexa.api.ai.ActionConfigurationListInput+xml">
+    <query>Proofread</query>
+    <action_type_identifier>refine_text</action_type_identifier>
+    <limit>10</limit>
+    <enabled>1</enabled>
+</ActionConfigurationListInput>
+
+                            
+
+ View more +
+
+
+ +
+
+
+
+
+ +
+ Code: 200 +
+
+
+
+
+
+

+ file_copy + +

+
+                                {
+    "ActionConfigurationList": {
+        "_media-type": "application/vnd.ibexa.api.ai.ActionConfigurationList+json",
+        "_href": "/api/ibexa/v2/ai/actions",
+        "ActionConfiguration": [
+            {
+                "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
+                "Identifier": "proofread_llamafile",
+                "Enabled": true,
+                "ActionType": {
+                    "_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
+                    "identifier": "refine_text",
+                    "name": "Refine text",
+                    "inputIdentifier": "text",
+                    "outputIdentifier": "text",
+                    "options": {}
+                },
+                "ActionTypeOptions": {},
+                "ActionHandlerIdentifier": "LLaVATextToText",
+                "ActionHandlerOptions": {
+                    "system_prompt": "Rewrite given text to identify and fix grammatical and punctuation errors. Pr
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                <?xml version="1.0" encoding="UTF-8"?>
+<ActionConfigurationList media-type="application/vnd.ibexa.api.ai.ActionConfigurationList+xml" href="/api/ibexa/v2/ai/actions">
+    <ActionConfiguration media-type="application/vnd.ibexa.api.ai.ActionConfiguration+xml">
+        <Identifier>proofread_llamafile</Identifier>
+        <Enabled>1</Enabled>
+        <ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
+            <identifier>refine_text</identifier>
+            <name>Refine text</name>
+            <inputIdentifier>text</inputIdentifier>
+            <outputIdentifier>text</outputIdentifier>
+            <options/>
+        </ActionType>
+        <ActionTypeOptions/>
+        <ActionHandlerIdentifier>LLaVATextToText</ActionHandlerIdentifier>
+        <ActionHandlerOptions>
+            <system_prompt>Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information.</system_prompt>
+        </ActionHandlerOptions>
+        <CreatedA
+                            
+
+ View more +
+
+
+ +
+
+
+
+
+
+
+

/ai/actions/{identifier}

+ +
+
+
+
+
+
+ Get an action configuration + ΒΆ +
+
+
+

+ GET + /ai/actions/{identifier} +

+

Returns an action configuration with specified identifier.

+

+
+
Header parameters
+
+

Accept

+

If set, the list is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + + + +
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.ai.ActionConfiguration+json +application/vnd.ibexa.api.ai.ActionConfiguration+xml + +
+
+
+
+ + +
+
Possible responses
+
+ + + + + + + + + + + + + +
CodeDescription
+ + 200 + + +

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + +
TypeDescription
+ + ActionConfiguration + +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ Code: 200 +
+
+
+
+
+
+

+ file_copy + +

+
+                                {
+    "ActionConfiguration": {
+        "_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
+        "Identifier": "expand_text",
+        "Enabled": true,
+        "ActionType": {
+            "_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
+            "identifier": "refine_text",
+            "name": "Refine text",
+            "inputIdentifier": "text",
+            "outputIdentifier": "text",
+            "options": {}
+        },
+        "ActionTypeOptions": {},
+        "ActionHandlerIdentifier": "openai-text-to-text",
+        "ActionHandlerOptions": {
+            "max_tokens": 4000,
+            "temperature": 1,
+            "prompt": "Expand the given text by 25%. Preserve meaning and crucial information.",
+            "model": "gpt-4-turbo"
+        },
+        "CreatedAt": "2024-12-09T09:02:44+00:00",
+        "UpdatedAt": "2024-12-09T09:02:44+00:00"
+    }
+}
+
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                <?xml version="1.0" encoding="UTF-8"?>
+<ActionConfiguration media-type="application/vnd.ibexa.api.ai.ActionConfiguration+xml">
+    <Identifier>expand_text</Identifier>
+    <Enabled>1</Enabled>
+    <ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
+        <identifier>refine_text</identifier>
+        <name>Refine text</name>
+        <inputIdentifier>text</inputIdentifier>
+        <outputIdentifier>text</outputIdentifier>
+        <options/>
+    </ActionType>
+    <ActionTypeOptions/>
+    <ActionHandlerIdentifier>openai-text-to-text</ActionHandlerIdentifier>
+    <ActionHandlerOptions>
+        <max_tokens>4000</max_tokens>
+        <temperature>1</temperature>
+        <prompt>Expand the given text by 25%. Preserve meaning and crucial information.</prompt>
+        <model>gpt-4-turbo</model>
+    </ActionHandlerOptions>
+    <CreatedAt>2024-12-09T09:02:44+00:00</CreatedAt>
+    <UpdatedAt>2024-12-09T09:02:44+00:00</UpdatedAt>
+</ActionConfiguration>
+
+                            
+
+ View more +
+
+
+ +
+
+
+
+
+
+

/ai/action-types

+
+
+
+

/ai/action-types

+ +
+
+
+
+
+
+ List action types + ΒΆ +
+
+
+

+ GET + /ai/action-types +

+

Returns a list of AI action types.

+

+
+
Header parameters
+
+

Accept

+

If set, the list is returned in XML or JSON format.

+
+ + + + + + + + + + + + + + + + + +
PropertyValue
Type + + + string + + + + +
Examples + application/vnd.ibexa.api.ai.ActionTypeList+json +application/vnd.ibexa.api.ai.ActionTypeList+xml + +
+
+
+
+ + +
+
Possible responses
+
+ + + + + + + + + + + + + +
CodeDescription
+ + 200 + + +

+
+
+
+ +
+
Types
+
+ + + + + + + + + + + + + +
TypeDescription
+ + ActionTypeListWrapper + +
+
+
+ +
+
+ +
+
+
+
+
+ +
+ Code: 200 +
+
+
+
+
+
+

+ file_copy + +

+
+                                {
+    "ActionTypeList": {
+        "_media-type": "application/vnd.ibexa.api.ai.ActionTypeList+json",
+        "_href": "/api/ibexa/v2/ai/action-types",
+        "ActionType": [
+            {
+                "_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
+                "identifier": "transcribe_audio",
+                "name": "Transcribe audio",
+                "inputIdentifier": "audio",
+                "outputIdentifier": "text",
+                "options": {}
+            },
+            {
+                "_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
+                "identifier": "generate_alt_text",
+                "name": "Generate alternative text",
+                "inputIdentifier": "image",
+                "outputIdentifier": "text",
+                "options": {
+                    "width": 512,
+                    "height": 512,
+                    "image_quality": 85
+                }
+            },
+            {
+                "_media-type": "app
+                            
+
+ View more +
+
+
+

+ file_copy + +

+
+                                <?xml version="1.0" encoding="UTF-8"?>
+<ActionTypeList media-type="application/vnd.ibexa.api.ai.ActionTypeList+xml" href="/api/ibexa/v2/ai/action-types">
+    <ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
+        <identifier>transcribe_audio</identifier>
+        <name>Transcribe audio</name>
+        <inputIdentifier>audio</inputIdentifier>
+        <outputIdentifier>text</outputIdentifier>
+        <options/>
+    </ActionType>
+    <ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
+        <identifier>generate_alt_text</identifier>
+        <name>Generate alternative text</name>
+        <inputIdentifier>image</inputIdentifier>
+        <outputIdentifier>text</outputIdentifier>
+        <options>
+            <width>512</width>
+            <height>512</height>
+            <image_quality>85</image_quality>
+        </options>
+    </ActionType>
+    <ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
+        <identifier>refine_text</ident
+                            
+
+ View more +
+
+
+