fi.evolver.ai.spring.skill.Skill Maven / Gradle / Ivy
package fi.evolver.ai.spring.skill;
import fi.evolver.ai.spring.chat.function.FunctionSpec;
public abstract class Skill {
private final Class parameterType;
private final Class resultType;
private final FunctionSpec functionSpec;
public Skill(Class parameterType, Class resultType) {
this.parameterType = parameterType;
this.resultType = resultType;
this.functionSpec = FunctionSpec.of(parameterType);
}
public abstract R apply(T parameters) throws SkillException;
public String getName() {
return getClass().getSimpleName();
}
public Class getParameterType() {
return parameterType;
}
public Class getResultType() {
return resultType;
}
public FunctionSpec getFunctionSpec() {
return functionSpec;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy