Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void processAdd(AddUpdateCommand cmd) throws IOException {
try {
String textToVectorise = inputFieldContent.getValue().toString();
float[] vector = textToVector.vectorise(textToVectorise);
List<Float> vectorAsList = new ArrayList<Float>(vector.length);
List<Float> vectorAsList = new ArrayList<>(vector.length);
for (float f : vector) {
vectorAsList.add(f);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public static void loadLargeLanguageModel(String fileName) throws Exception {
assertJPut(LargeLanguageModelStore.REST_END_POINT, model, "/responseHeader/status==0");
}

protected static void prepareIndex() throws Exception {
protected static void prepareIndex() {
List<SolrInputDocument> docsToIndex = prepareDocs();
for (SolrInputDocument doc : docsToIndex) {
assertU(adoc(doc));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void test() throws Exception {

final ManagedResource res = restManager.getManagedResource(resourceId);
assertTrue(res instanceof LargeLanguageModelStore);
assertEquals(res.getResourceId(), resourceId);
assertEquals(resourceId, res.getResourceId());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void test() throws Exception {

final ManagedResource res = restManager.getManagedResource(resourceId);
assertTrue(res instanceof TextToVectorModelStore);
assertEquals(res.getResourceId(), resourceId);
assertEquals(resourceId, res.getResourceId());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ private UpdateRequestProcessor createUpdateProcessor(
String outputFieldName,
String prompt,
SolrCore core,
String modelName)
throws Exception {
String modelName) {

LargeLanguageModelStore.getManagedModelStore(core)
.addModel(new SolrLargeLanguageModel(modelName, null, null));
Expand Down
Loading