feat: 支持工作流多知识库向量检索

This commit is contained in:
2026-09-04 17:40:15 +08:00
parent 7900552ede
commit 130423edb4
15 changed files with 2092 additions and 129 deletions

View File

@@ -43,6 +43,11 @@ public class StoreOptions extends Metadata {
public void setEmbeddingOptions(EmbeddingOptions embeddingOptions) {
throw new IllegalStateException("Can not set embeddingOptions to the default instance.");
}
@Override
public void setTimeoutMillis(Long timeoutMillis) {
throw new IllegalStateException("Can not set timeoutMillis to the default instance.");
}
};
/**
@@ -65,6 +70,11 @@ public class StoreOptions extends Metadata {
*/
private EmbeddingOptions embeddingOptions = EmbeddingOptions.DEFAULT;
/**
* Optional upper bound for one store operation.
*/
private Long timeoutMillis;
public String getCollectionName() {
return collectionName;
@@ -111,6 +121,17 @@ public class StoreOptions extends Metadata {
this.embeddingOptions = embeddingOptions;
}
public Long getTimeoutMillis() {
return timeoutMillis;
}
public void setTimeoutMillis(Long timeoutMillis) {
if (timeoutMillis != null && timeoutMillis <= 0L) {
throw new IllegalArgumentException("timeoutMillis must be greater than zero");
}
this.timeoutMillis = timeoutMillis;
}
public static StoreOptions ofCollectionName(String collectionName) {
StoreOptions storeOptions = new StoreOptions();

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2023-2026, Easy-Agents (fuhai999@gmail.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
package com.easyagents.core.store;
/**
* Indicates that a store operation exhausted its caller-provided time budget.
*/
public class StoreTimeoutException extends RuntimeException {
public StoreTimeoutException(String message) {
super(message);
}
public StoreTimeoutException(String message, Throwable cause) {
super(message, cause);
}
}