Skip to content

Commit

Permalink
feat: Add new feature allowResume #444 (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
astsiapanay authored Aug 15, 2024
1 parent e3317bd commit 5eecef3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/epam/aidial/core/config/Features.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ public class Features {

private Boolean urlAttachmentsSupported;
private Boolean folderAttachmentsSupported;
private Boolean allowResume;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ static FeaturesData createFeatures(Features features) {
data.setFolderAttachments(features.getFolderAttachmentsSupported());
}

if (features.getAllowResume() != null) {
data.setAllowResume(features.getAllowResume());
}

return data;
}
}
1 change: 1 addition & 0 deletions src/main/java/com/epam/aidial/core/data/FeaturesData.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ public class FeaturesData {
private boolean seed = false;
private boolean urlAttachments = false;
private boolean folderAttachments = false;
private boolean allowResume = false;
}
33 changes: 22 additions & 11 deletions src/test/java/com/epam/aidial/core/CustomApplicationApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ void testApplicationSharing() {
"tools" : false,
"seed" : false,
"url_attachments" : false,
"folder_attachments" : false
"folder_attachments" : false,
"allow_resume":false
},
"defaults" : { }
}
Expand Down Expand Up @@ -362,7 +363,8 @@ void testApplicationSharing() {
"tools":false,
"seed":false,
"url_attachments":false,
"folder_attachments":false
"folder_attachments":false,
"allow_resume":false
},
"defaults":{}
},
Expand All @@ -388,7 +390,8 @@ void testApplicationSharing() {
"tools" : false,
"seed" : false,
"url_attachments" : false,
"folder_attachments" : false
"folder_attachments" : false,
"allow_resume":false
},
"defaults" : { }
}
Expand Down Expand Up @@ -423,7 +426,8 @@ void testApplicationSharing() {
"tools":false,
"seed":false,
"url_attachments":false,
"folder_attachments":false
"folder_attachments":false,
"allow_resume":false
},
"defaults":{}
},
Expand All @@ -449,7 +453,8 @@ void testApplicationSharing() {
"tools" : false,
"seed" : false,
"url_attachments" : false,
"folder_attachments" : false
"folder_attachments" : false,
"allow_resume":false
},
"defaults" : { }
}
Expand Down Expand Up @@ -557,7 +562,8 @@ void testApplicationPublication() {
"tools":false,
"seed":false,
"url_attachments":false,
"folder_attachments":false
"folder_attachments":false,
"allow_resume":false
},
"defaults":{}
},
Expand All @@ -583,7 +589,8 @@ void testApplicationPublication() {
"tools" : false,
"seed" : false,
"url_attachments" : false,
"folder_attachments" : false
"folder_attachments" : false,
"allow_resume":false
},
"defaults" : { }
}
Expand Down Expand Up @@ -621,7 +628,8 @@ void testOpenAiApplicationListing() {
"tools":false,
"seed":false,
"url_attachments":false,
"folder_attachments":false
"folder_attachments":false,
"allow_resume": false
},
"defaults":{}
}
Expand Down Expand Up @@ -671,7 +679,8 @@ void testOpenAiApplicationListing() {
"tools":false,
"seed":false,
"url_attachments":false,
"folder_attachments":false
"folder_attachments":false,
"allow_resume": false
},
"defaults":{}
}
Expand Down Expand Up @@ -703,7 +712,8 @@ void testOpenAiApplicationListing() {
"tools":false,
"seed":false,
"url_attachments":false,
"folder_attachments":false
"folder_attachments":false,
"allow_resume": false
},
"defaults":{}
},
Expand All @@ -729,7 +739,8 @@ void testOpenAiApplicationListing() {
"tools" : false,
"seed" : false,
"url_attachments" : false,
"folder_attachments" : false
"folder_attachments" : false,
"allow_resume": false
},
"defaults" : { }
}
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/com/epam/aidial/core/ListingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
"""));
}
Expand All @@ -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
}
"""));
}
Expand All @@ -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
}
"""));
}
Expand All @@ -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
}
"""));
}
Expand Down

0 comments on commit 5eecef3

Please sign in to comment.