-
Notifications
You must be signed in to change notification settings - Fork 82
[REST] New AI endpoints #2605
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
[REST] New AI endpoints #2605
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
073ad6e
[REST] New AI endpoints
mnocon 9f8e860
Review fixes - part 1
mnocon c581082
Regenerated responses
mnocon 2ef0e04
Rebuild the reference
mnocon f3e972a
Added fullstops.
mnocon 580a1f3
Added descriptions
mnocon d558aa7
Regemerated the reference
mnocon 03d234e
Description fixes
mnocon c50f0b7
Regenerated the reference
mnocon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...pi/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.json.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...api/rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionType.xml.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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> |
36 changes: 36 additions & 0 deletions
36
...est_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.json.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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": {} | ||
} | ||
] | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...rest_api/rest_api_reference/input/examples/ai/action-types/GET/ActionTypeList.xml.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?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</identifier> | ||
<name>Refine text</name> | ||
<inputIdentifier>text</inputIdentifier> | ||
<outputIdentifier>text</outputIdentifier> | ||
<options/> | ||
</ActionType> | ||
</ActionTypeList> |
33 changes: 33 additions & 0 deletions
33
...est_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.json.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"ActionConfiguration": { | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "gen_alt_text", | ||
"name": "Generate alternative text", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...rest_api/rest_api_reference/input/examples/ai/actions/GET/ActionConfiguration.xml.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ActionConfiguration media-type="application/vnd.ibexa.api.ai.ActionConfiguration+xml"> | ||
mnocon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<identifier>gen_alt_text</identifier> | ||
<name>Generate alternative text</name> | ||
<description></description> | ||
<enabled>1</enabled> | ||
<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> | ||
<actionTypeOptions> | ||
<max_length>140</max_length> | ||
</actionTypeOptions> | ||
<actionHandlerIdentifier>openai-image-to-text</actionHandlerIdentifier> | ||
<actionHandlerOptions> | ||
<max_tokens>4000</max_tokens> | ||
<temperature>1</temperature> | ||
<prompt></prompt> | ||
<model>gpt-4-turbo</model> | ||
</actionHandlerOptions> | ||
<createdAt>2025-02-06T13:20:24+00:00</createdAt> | ||
<updatedAt>2025-02-06T13:20:24+00:00</updatedAt> | ||
</ActionConfiguration> |
214 changes: 214 additions & 0 deletions
214
...api/rest_api_reference/input/examples/ai/actions/GET/ActionConfigurationList.json.example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{ | ||
"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", | ||
mnocon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"identifier": "gen_alt_text", | ||
"name": "Generate alternative text", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "improve_readability", | ||
"name": "Improve readability", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "proofread", | ||
"name": "Proofread", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "shorten_text", | ||
"name": "Shorten text", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "expand_text", | ||
"name": "Expand text", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "summarize_text", | ||
"name": "Summarize", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "rewrite_with_professional_tone", | ||
"name": "Rewrite in professional tone", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
}, | ||
{ | ||
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json", | ||
"identifier": "rewrite_with_friendly_tone", | ||
"name": "Rewrite in friendly tone", | ||
"description": "", | ||
"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": "2025-02-06T13:20:24+00:00", | ||
"updatedAt": "2025-02-06T13:20:24+00:00" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.