io.quarkiverse.langchain4j.runtime.tool.ToolInvoker Maven / Gradle / Ivy
package io.quarkiverse.langchain4j.runtime.tool;
import java.util.Map;
public interface ToolInvoker {
MethodMetadata methodMetadata();
Object invoke(Object tool, Object[] params) throws Exception;
class MethodMetadata {
private final boolean returnsVoid;
private final Map nameToParamPosition;
private final Integer memoryIdParamPosition;
public MethodMetadata(boolean returnsVoid, Map nameToParamPosition,
Integer memoryIdParamPosition) {
this.returnsVoid = returnsVoid;
this.nameToParamPosition = nameToParamPosition;
this.memoryIdParamPosition = memoryIdParamPosition;
}
public boolean isReturnsVoid() {
return returnsVoid;
}
public Map getNameToParamPosition() {
return nameToParamPosition;
}
public Integer getMemoryIdParamPosition() {
return memoryIdParamPosition;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy