diff --git a/src/main/java/com/epam/aidial/core/config/Features.java b/src/main/java/com/epam/aidial/core/config/Features.java index 7f8b15d96..a4d10c821 100644 --- a/src/main/java/com/epam/aidial/core/config/Features.java +++ b/src/main/java/com/epam/aidial/core/config/Features.java @@ -17,4 +17,5 @@ public class Features { private Boolean urlAttachmentsSupported; private Boolean folderAttachmentsSupported; + private Boolean allowResume; } \ No newline at end of file diff --git a/src/main/java/com/epam/aidial/core/config/FileConfigStore.java b/src/main/java/com/epam/aidial/core/config/FileConfigStore.java index 1926cdb31..7d66e0ba5 100644 --- a/src/main/java/com/epam/aidial/core/config/FileConfigStore.java +++ b/src/main/java/com/epam/aidial/core/config/FileConfigStore.java @@ -173,5 +173,8 @@ private static void setMissingFeatures(Deployment model, Features features) { if (modelFeatures.getFolderAttachmentsSupported() == null) { modelFeatures.setFolderAttachmentsSupported(features.getFolderAttachmentsSupported()); } + if (modelFeatures.getAllowResume() == null) { + modelFeatures.setAllowResume(features.getAllowResume()); + } } } diff --git a/src/main/java/com/epam/aidial/core/controller/DeploymentController.java b/src/main/java/com/epam/aidial/core/controller/DeploymentController.java index 2292da8d7..b42b22a52 100644 --- a/src/main/java/com/epam/aidial/core/controller/DeploymentController.java +++ b/src/main/java/com/epam/aidial/core/controller/DeploymentController.java @@ -129,6 +129,10 @@ static FeaturesData createFeatures(Features features) { data.setFolderAttachments(features.getFolderAttachmentsSupported()); } + if (features.getAllowResume() != null) { + data.setAllowResume(features.getAllowResume()); + } + return data; } } \ No newline at end of file diff --git a/src/main/java/com/epam/aidial/core/data/FeaturesData.java b/src/main/java/com/epam/aidial/core/data/FeaturesData.java index 482dcfa48..916816189 100644 --- a/src/main/java/com/epam/aidial/core/data/FeaturesData.java +++ b/src/main/java/com/epam/aidial/core/data/FeaturesData.java @@ -19,4 +19,5 @@ public class FeaturesData { private boolean seed = false; private boolean urlAttachments = false; private boolean folderAttachments = false; + private boolean allowResume = false; } \ No newline at end of file diff --git a/src/test/java/com/epam/aidial/core/CustomApplicationApiTest.java b/src/test/java/com/epam/aidial/core/CustomApplicationApiTest.java index 0e04fa9c6..64d4e05c2 100644 --- a/src/test/java/com/epam/aidial/core/CustomApplicationApiTest.java +++ b/src/test/java/com/epam/aidial/core/CustomApplicationApiTest.java @@ -330,7 +330,8 @@ void testApplicationSharing() { "tools" : false, "seed" : false, "url_attachments" : false, - "folder_attachments" : false + "folder_attachments" : false, + "allow_resume":false }, "defaults" : { } } @@ -362,7 +363,8 @@ void testApplicationSharing() { "tools":false, "seed":false, "url_attachments":false, - "folder_attachments":false + "folder_attachments":false, + "allow_resume":false }, "defaults":{} }, @@ -388,7 +390,8 @@ void testApplicationSharing() { "tools" : false, "seed" : false, "url_attachments" : false, - "folder_attachments" : false + "folder_attachments" : false, + "allow_resume":false }, "defaults" : { } } @@ -423,7 +426,8 @@ void testApplicationSharing() { "tools":false, "seed":false, "url_attachments":false, - "folder_attachments":false + "folder_attachments":false, + "allow_resume":false }, "defaults":{} }, @@ -449,7 +453,8 @@ void testApplicationSharing() { "tools" : false, "seed" : false, "url_attachments" : false, - "folder_attachments" : false + "folder_attachments" : false, + "allow_resume":false }, "defaults" : { } } @@ -557,7 +562,8 @@ void testApplicationPublication() { "tools":false, "seed":false, "url_attachments":false, - "folder_attachments":false + "folder_attachments":false, + "allow_resume":false }, "defaults":{} }, @@ -583,7 +589,8 @@ void testApplicationPublication() { "tools" : false, "seed" : false, "url_attachments" : false, - "folder_attachments" : false + "folder_attachments" : false, + "allow_resume":false }, "defaults" : { } } @@ -621,7 +628,8 @@ void testOpenAiApplicationListing() { "tools":false, "seed":false, "url_attachments":false, - "folder_attachments":false + "folder_attachments":false, + "allow_resume": false }, "defaults":{} } @@ -671,7 +679,8 @@ void testOpenAiApplicationListing() { "tools":false, "seed":false, "url_attachments":false, - "folder_attachments":false + "folder_attachments":false, + "allow_resume": false }, "defaults":{} } @@ -703,7 +712,8 @@ void testOpenAiApplicationListing() { "tools":false, "seed":false, "url_attachments":false, - "folder_attachments":false + "folder_attachments":false, + "allow_resume": false }, "defaults":{} }, @@ -729,7 +739,8 @@ void testOpenAiApplicationListing() { "tools" : false, "seed" : false, "url_attachments" : false, - "folder_attachments" : false + "folder_attachments" : false, + "allow_resume": false }, "defaults" : { } } diff --git a/src/test/java/com/epam/aidial/core/ListingTest.java b/src/test/java/com/epam/aidial/core/ListingTest.java index e2c4f4c40..af8d02d68 100644 --- a/src/test/java/com/epam/aidial/core/ListingTest.java +++ b/src/test/java/com/epam/aidial/core/ListingTest.java @@ -51,7 +51,7 @@ void testFeaturesEmbedding(Vertx vertx, VertxTestContext context) { { "rate": false, "tokenize": false, "truncate_prompt": false , "system_prompt": true, "tools": false, "seed": false , "url_attachments": false, "folder_attachments": false - , "configuration": false + , "configuration": false, "allow_resume": false } """)); } @@ -62,7 +62,7 @@ void testFeaturesModel(Vertx vertx, VertxTestContext context) { { "rate": true, "tokenize": true, "truncate_prompt": true , "system_prompt": true, "tools": true, "seed": true , "url_attachments": true, "folder_attachments": false - , "configuration": false + , "configuration": false, "allow_resume": false } """)); } @@ -73,7 +73,7 @@ void testFeaturesApplication(Vertx vertx, VertxTestContext context) { { "rate": true, "tokenize": false, "truncate_prompt": false , "system_prompt": false, "tools": false, "seed": false , "url_attachments": false, "folder_attachments": false - , "configuration": true + , "configuration": true, "allow_resume": false } """)); } @@ -84,7 +84,7 @@ void testFeaturesAssistant(Vertx vertx, VertxTestContext context) { { "rate": true, "tokenize": false, "truncate_prompt": false , "system_prompt": true, "tools": false, "seed": false , "url_attachments": false, "folder_attachments": false - , "configuration": false + , "configuration": false, "allow_resume": false } """)); }