68 lines
2.3 KiB
Java
Generated
68 lines
2.3 KiB
Java
Generated
// This file is auto-generated by alef — DO NOT EDIT.
|
|
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
|
|
// To regenerate: alef generate
|
|
// To verify freshness: alef verify --exit-code
|
|
// Issues & docs: https://github.com/kreuzberg-dev/alef
|
|
package dev.kreuzberg;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
/**
|
|
* Token reduction configuration.
|
|
*/
|
|
@JsonInclude(JsonInclude.Include.NON_ABSENT)
|
|
@JsonDeserialize(builder = TokenReductionOptions.Builder.class)
|
|
public record TokenReductionOptions(
|
|
/**
|
|
* Reduction mode: "off", "light", "moderate", "aggressive", "maximum"
|
|
*/
|
|
@Nullable @JsonProperty("mode") String mode,
|
|
/**
|
|
* Preserve important words (capitalized, technical terms)
|
|
*/
|
|
@Nullable @JsonProperty("preserve_important_words") Boolean preserveImportantWords
|
|
) {
|
|
public static Builder builder() {
|
|
return new Builder();
|
|
}
|
|
|
|
// CPD-OFF
|
|
@JsonPOJOBuilder(withPrefix = "with", buildMethodName = "build")
|
|
public static final class Builder {
|
|
|
|
private String mode = null;
|
|
@JsonProperty("preserve_important_words")
|
|
private Boolean preserveImportantWords = null;
|
|
|
|
/** Sets the mode field. */
|
|
@JsonProperty("mode")
|
|
public Builder withMode(final @Nullable String value) {
|
|
this.mode = value;
|
|
return this;
|
|
}
|
|
|
|
/** Sets the preserveImportantWords field. */
|
|
@JsonProperty("preserve_important_words")
|
|
public Builder withPreserveImportantWords(final @Nullable Boolean value) {
|
|
this.preserveImportantWords = value;
|
|
return this;
|
|
}
|
|
|
|
/** Builds the TokenReductionOptions instance. */
|
|
public TokenReductionOptions build() {
|
|
return new TokenReductionOptions(
|
|
mode,
|
|
preserveImportantWords
|
|
);
|
|
}
|
|
}
|
|
// CPD-ON
|
|
public static TokenReductionOptions defaultInstance() {
|
|
throw new UnsupportedOperationException("defaultInstance is not yet bridged via JNI; use the Builder instead.");
|
|
}
|
|
}
|