Skip to content

Commit 91cec13

Browse files
authored
[REST] New AI endpoints (#2605)
* [REST] New AI endpoints * Review fixes - part 1 * Regenerated responses * Rebuild the reference * Added fullstops. * Added descriptions * Regemerated the reference * Description fixes * Regenerated the reference
1 parent 381075a commit 91cec13

22 files changed

+4623
-301
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"ActionType": {
3+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
4+
"identifier": "generate_alt_text",
5+
"name": "Generate alternative text",
6+
"inputIdentifier": "image",
7+
"outputIdentifier": "text",
8+
"options": {
9+
"width": 512,
10+
"height": 512,
11+
"image_quality": 85
12+
}
13+
}
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
3+
<identifier>generate_alt_text</identifier>
4+
<name>Generate alternative text</name>
5+
<inputIdentifier>image</inputIdentifier>
6+
<outputIdentifier>text</outputIdentifier>
7+
<options>
8+
<width>512</width>
9+
<height>512</height>
10+
<image_quality>85</image_quality>
11+
</options>
12+
</ActionType>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"ActionTypeList": {
3+
"_media-type": "application/vnd.ibexa.api.ai.ActionTypeList+json",
4+
"_href": "/api/ibexa/v2/ai/action-types",
5+
"ActionType": [
6+
{
7+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
8+
"identifier": "transcribe_audio",
9+
"name": "Transcribe audio",
10+
"inputIdentifier": "audio",
11+
"outputIdentifier": "text",
12+
"options": {}
13+
},
14+
{
15+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
16+
"identifier": "generate_alt_text",
17+
"name": "Generate alternative text",
18+
"inputIdentifier": "image",
19+
"outputIdentifier": "text",
20+
"options": {
21+
"width": 512,
22+
"height": 512,
23+
"image_quality": 85
24+
}
25+
},
26+
{
27+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
28+
"identifier": "refine_text",
29+
"name": "Refine text",
30+
"inputIdentifier": "text",
31+
"outputIdentifier": "text",
32+
"options": {}
33+
}
34+
]
35+
}
36+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ActionTypeList media-type="application/vnd.ibexa.api.ai.ActionTypeList+xml" href="/api/ibexa/v2/ai/action-types">
3+
<ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
4+
<identifier>transcribe_audio</identifier>
5+
<name>Transcribe audio</name>
6+
<inputIdentifier>audio</inputIdentifier>
7+
<outputIdentifier>text</outputIdentifier>
8+
<options/>
9+
</ActionType>
10+
<ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
11+
<identifier>generate_alt_text</identifier>
12+
<name>Generate alternative text</name>
13+
<inputIdentifier>image</inputIdentifier>
14+
<outputIdentifier>text</outputIdentifier>
15+
<options>
16+
<width>512</width>
17+
<height>512</height>
18+
<image_quality>85</image_quality>
19+
</options>
20+
</ActionType>
21+
<ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
22+
<identifier>refine_text</identifier>
23+
<name>Refine text</name>
24+
<inputIdentifier>text</inputIdentifier>
25+
<outputIdentifier>text</outputIdentifier>
26+
<options/>
27+
</ActionType>
28+
</ActionTypeList>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"ActionConfiguration": {
3+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
4+
"identifier": "gen_alt_text",
5+
"name": "Generate alternative text",
6+
"description": "",
7+
"enabled": true,
8+
"ActionType": {
9+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
10+
"identifier": "generate_alt_text",
11+
"name": "Generate alternative text",
12+
"inputIdentifier": "image",
13+
"outputIdentifier": "text",
14+
"options": {
15+
"width": 512,
16+
"height": 512,
17+
"image_quality": 85
18+
}
19+
},
20+
"actionTypeOptions": {
21+
"max_length": 140
22+
},
23+
"actionHandlerIdentifier": "openai-image-to-text",
24+
"actionHandlerOptions": {
25+
"max_tokens": 4000,
26+
"temperature": 1,
27+
"prompt": "",
28+
"model": "gpt-4-turbo"
29+
},
30+
"createdAt": "2025-02-06T13:20:24+00:00",
31+
"updatedAt": "2025-02-06T13:20:24+00:00"
32+
}
33+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ActionConfiguration media-type="application/vnd.ibexa.api.ai.ActionConfiguration+xml">
3+
<identifier>gen_alt_text</identifier>
4+
<name>Generate alternative text</name>
5+
<description></description>
6+
<enabled>1</enabled>
7+
<ActionType media-type="application/vnd.ibexa.api.ai.ActionType+xml">
8+
<identifier>generate_alt_text</identifier>
9+
<name>Generate alternative text</name>
10+
<inputIdentifier>image</inputIdentifier>
11+
<outputIdentifier>text</outputIdentifier>
12+
<options>
13+
<width>512</width>
14+
<height>512</height>
15+
<image_quality>85</image_quality>
16+
</options>
17+
</ActionType>
18+
<actionTypeOptions>
19+
<max_length>140</max_length>
20+
</actionTypeOptions>
21+
<actionHandlerIdentifier>openai-image-to-text</actionHandlerIdentifier>
22+
<actionHandlerOptions>
23+
<max_tokens>4000</max_tokens>
24+
<temperature>1</temperature>
25+
<prompt></prompt>
26+
<model>gpt-4-turbo</model>
27+
</actionHandlerOptions>
28+
<createdAt>2025-02-06T13:20:24+00:00</createdAt>
29+
<updatedAt>2025-02-06T13:20:24+00:00</updatedAt>
30+
</ActionConfiguration>
Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
{
2+
"ActionConfigurationList": {
3+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfigurationList+json",
4+
"_href": "/api/ibexa/v2/ai/actions",
5+
"ActionConfiguration": [
6+
{
7+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
8+
"identifier": "gen_alt_text",
9+
"name": "Generate alternative text",
10+
"description": "",
11+
"enabled": true,
12+
"ActionType": {
13+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
14+
"identifier": "generate_alt_text",
15+
"name": "Generate alternative text",
16+
"inputIdentifier": "image",
17+
"outputIdentifier": "text",
18+
"options": {
19+
"width": 512,
20+
"height": 512,
21+
"image_quality": 85
22+
}
23+
},
24+
"actionTypeOptions": {
25+
"max_length": 140
26+
},
27+
"actionHandlerIdentifier": "openai-image-to-text",
28+
"actionHandlerOptions": {
29+
"max_tokens": 4000,
30+
"temperature": 1,
31+
"prompt": "",
32+
"model": "gpt-4-turbo"
33+
},
34+
"createdAt": "2025-02-06T13:20:24+00:00",
35+
"updatedAt": "2025-02-06T13:20:24+00:00"
36+
},
37+
{
38+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
39+
"identifier": "improve_readability",
40+
"name": "Improve readability",
41+
"description": "",
42+
"enabled": true,
43+
"ActionType": {
44+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
45+
"identifier": "refine_text",
46+
"name": "Refine text",
47+
"inputIdentifier": "text",
48+
"outputIdentifier": "text",
49+
"options": {}
50+
},
51+
"actionTypeOptions": {},
52+
"actionHandlerIdentifier": "openai-text-to-text",
53+
"actionHandlerOptions": {
54+
"max_tokens": 4000,
55+
"temperature": 1,
56+
"prompt": "Rewrite this content to improve readability. Preserve meaning and crucial information.",
57+
"model": "gpt-4-turbo"
58+
},
59+
"createdAt": "2025-02-06T13:20:24+00:00",
60+
"updatedAt": "2025-02-06T13:20:24+00:00"
61+
},
62+
{
63+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
64+
"identifier": "proofread",
65+
"name": "Proofread",
66+
"description": "",
67+
"enabled": true,
68+
"ActionType": {
69+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
70+
"identifier": "refine_text",
71+
"name": "Refine text",
72+
"inputIdentifier": "text",
73+
"outputIdentifier": "text",
74+
"options": {}
75+
},
76+
"actionTypeOptions": {},
77+
"actionHandlerIdentifier": "openai-text-to-text",
78+
"actionHandlerOptions": {
79+
"max_tokens": 4000,
80+
"temperature": 1,
81+
"prompt": "Rewrite given text to identify and fix grammatical and punctuation errors. Preserve meaning and crucial information.",
82+
"model": "gpt-4-turbo"
83+
},
84+
"createdAt": "2025-02-06T13:20:24+00:00",
85+
"updatedAt": "2025-02-06T13:20:24+00:00"
86+
},
87+
{
88+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
89+
"identifier": "shorten_text",
90+
"name": "Shorten text",
91+
"description": "",
92+
"enabled": true,
93+
"ActionType": {
94+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
95+
"identifier": "refine_text",
96+
"name": "Refine text",
97+
"inputIdentifier": "text",
98+
"outputIdentifier": "text",
99+
"options": {}
100+
},
101+
"actionTypeOptions": {},
102+
"actionHandlerIdentifier": "openai-text-to-text",
103+
"actionHandlerOptions": {
104+
"max_tokens": 4000,
105+
"temperature": 1,
106+
"prompt": "Shorten the given text by 25%. Preserve meaning and crucial information.",
107+
"model": "gpt-4-turbo"
108+
},
109+
"createdAt": "2025-02-06T13:20:24+00:00",
110+
"updatedAt": "2025-02-06T13:20:24+00:00"
111+
},
112+
{
113+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
114+
"identifier": "expand_text",
115+
"name": "Expand text",
116+
"description": "",
117+
"enabled": true,
118+
"ActionType": {
119+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
120+
"identifier": "refine_text",
121+
"name": "Refine text",
122+
"inputIdentifier": "text",
123+
"outputIdentifier": "text",
124+
"options": {}
125+
},
126+
"actionTypeOptions": {},
127+
"actionHandlerIdentifier": "openai-text-to-text",
128+
"actionHandlerOptions": {
129+
"max_tokens": 4000,
130+
"temperature": 1,
131+
"prompt": "Expand the given text by 25%. Preserve meaning and crucial information.",
132+
"model": "gpt-4-turbo"
133+
},
134+
"createdAt": "2025-02-06T13:20:24+00:00",
135+
"updatedAt": "2025-02-06T13:20:24+00:00"
136+
},
137+
{
138+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
139+
"identifier": "summarize_text",
140+
"name": "Summarize",
141+
"description": "",
142+
"enabled": true,
143+
"ActionType": {
144+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
145+
"identifier": "refine_text",
146+
"name": "Refine text",
147+
"inputIdentifier": "text",
148+
"outputIdentifier": "text",
149+
"options": {}
150+
},
151+
"actionTypeOptions": {},
152+
"actionHandlerIdentifier": "openai-text-to-text",
153+
"actionHandlerOptions": {
154+
"max_tokens": 4000,
155+
"temperature": 1,
156+
"prompt": "Summarize text into one sentence. Preserve meaning and crucial information.",
157+
"model": "gpt-4-turbo"
158+
},
159+
"createdAt": "2025-02-06T13:20:24+00:00",
160+
"updatedAt": "2025-02-06T13:20:24+00:00"
161+
},
162+
{
163+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
164+
"identifier": "rewrite_with_professional_tone",
165+
"name": "Rewrite in professional tone",
166+
"description": "",
167+
"enabled": true,
168+
"ActionType": {
169+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
170+
"identifier": "refine_text",
171+
"name": "Refine text",
172+
"inputIdentifier": "text",
173+
"outputIdentifier": "text",
174+
"options": {}
175+
},
176+
"actionTypeOptions": {},
177+
"actionHandlerIdentifier": "openai-text-to-text",
178+
"actionHandlerOptions": {
179+
"max_tokens": 4000,
180+
"temperature": 1,
181+
"prompt": "Rewrite text in professional tone. Preserve meaning and crucial information.",
182+
"model": "gpt-4-turbo"
183+
},
184+
"createdAt": "2025-02-06T13:20:24+00:00",
185+
"updatedAt": "2025-02-06T13:20:24+00:00"
186+
},
187+
{
188+
"_media-type": "application/vnd.ibexa.api.ai.ActionConfiguration+json",
189+
"identifier": "rewrite_with_friendly_tone",
190+
"name": "Rewrite in friendly tone",
191+
"description": "",
192+
"enabled": true,
193+
"ActionType": {
194+
"_media-type": "application/vnd.ibexa.api.ai.ActionType+json",
195+
"identifier": "refine_text",
196+
"name": "Refine text",
197+
"inputIdentifier": "text",
198+
"outputIdentifier": "text",
199+
"options": {}
200+
},
201+
"actionTypeOptions": {},
202+
"actionHandlerIdentifier": "openai-text-to-text",
203+
"actionHandlerOptions": {
204+
"max_tokens": 4000,
205+
"temperature": 1,
206+
"prompt": "Rewrite text in friendly tone. Preserve meaning and crucial information.",
207+
"model": "gpt-4-turbo"
208+
},
209+
"createdAt": "2025-02-06T13:20:24+00:00",
210+
"updatedAt": "2025-02-06T13:20:24+00:00"
211+
}
212+
]
213+
}
214+
}

0 commit comments

Comments
 (0)