Skip to content

Commit 56b33d8

Browse files
committed
fix: disable timeout when calling prompt processors
1 parent e7e4929 commit 56b33d8

File tree

8 files changed

+14
-2
lines changed

8 files changed

+14
-2
lines changed

_build/gpm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: modAI
2-
version: 0.0.7-alpha
2+
version: 0.0.8-alpha
33
lowCaseName: modai
44
namespace: modAI
55
author: 'John Peca'

assets/components/modai/js/mgr/autosummary.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ Ext.onReady(function() {
186186

187187
MODx.Ajax.request({
188188
url: MODx.config.connector_url,
189+
timeout: 0,
189190
params: {
190191
action: 'modAI\\Processors\\Prompt\\Text',
191192
id: MODx.request.id,
@@ -256,6 +257,7 @@ Ext.onReady(function() {
256257

257258
MODx.Ajax.request({
258259
url: MODx.config.connector_url,
260+
timeout: 0,
259261
params: {
260262
action: 'modAI\\Processors\\Prompt\\Text',
261263
id: MODx.request.id,
@@ -318,6 +320,7 @@ Ext.onReady(function() {
318320

319321
MODx.Ajax.request({
320322
url: MODx.config.connector_url,
323+
timeout: 0,
321324
params: {
322325
action: 'modAI\\Processors\\Prompt\\Vision',
323326
image: base64Data

assets/components/modai/js/mgr/widgets/image_prompt.window.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Ext.extend(modAI.window.ImagePrompt,MODx.Window, {
160160

161161
MODx.Ajax.request({
162162
url: MODx.config.connector_url,
163+
timeout: 0,
163164
params: {
164165
action: 'modAI\\Processors\\Prompt\\Image',
165166
prompt: this.prompt.getValue()

assets/components/modai/js/mgr/widgets/text_prompt.window.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ Ext.extend(modAI.window.TextPrompt,MODx.Window, {
173173

174174
MODx.Ajax.request({
175175
url: MODx.config.connector_url,
176+
timeout: 0,
176177
params: {
177178
action: 'modAI\\Processors\\Prompt\\FreeText',
178179
prompt: this.prompt.getValue(),

core/components/modai/src/Processors/Prompt/FreeText.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ class FreeText extends Processor
1111
{
1212
public function process()
1313
{
14+
set_time_limit(0);
15+
1416
$prompt = $this->getProperty('prompt');
1517
$field = $this->getProperty('field');
1618

1719
if (empty($prompt)) {
1820
return $this->failure('Prompt is required.');
1921
}
2022

21-
2223
$systemInstructions = [];
2324

2425
try {

core/components/modai/src/Processors/Prompt/Image.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class Image extends Processor
1111
{
1212
public function process()
1313
{
14+
set_time_limit(0);
15+
1416
$prompt = $this->getProperty('prompt');
1517
if (empty($prompt)) {
1618
return $this->failure('Prompt is required');

core/components/modai/src/Processors/Prompt/Text.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ class Text extends Processor
1313

1414
public function process()
1515
{
16+
set_time_limit(0);
17+
1618
$fields = array_flip(self::$validFields);
1719
$field = $this->getProperty('field');
1820

core/components/modai/src/Processors/Prompt/Vision.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ class Vision extends Processor
1010
{
1111
public function process()
1212
{
13+
set_time_limit(0);
14+
1315
$image = $this->getProperty('image');
1416
if (empty($image)) {
1517
return $this->failure('Image is required');

0 commit comments

Comments
 (0)