Skip to content

Commit ff1525e

Browse files
committed
[REST] New AI endpoints
1 parent 26a5af1 commit ff1525e

22 files changed

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

0 commit comments

Comments
 (0)