dev.langchain4j.service.output.FloatOutputParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of langchain4j Show documentation
Show all versions of langchain4j Show documentation
Java implementation of LangChain: Integrate your Java application with countless AI tools and services
smoothly
package dev.langchain4j.service.output;
class FloatOutputParser implements OutputParser {
@Override
public Float parse(String string) {
return Float.parseFloat(string.trim());
}
@Override
public String formatInstructions() {
return "floating point number";
}
}