diff --git a/openai-client/src/main/java/com/hw/openai/entity/completions/Choice.java b/openai-client/src/main/java/com/hw/openai/entity/completions/Choice.java index abf9c7081..fddb30578 100644 --- a/openai-client/src/main/java/com/hw/openai/entity/completions/Choice.java +++ b/openai-client/src/main/java/com/hw/openai/entity/completions/Choice.java @@ -33,7 +33,7 @@ public class Choice { private Integer index; - private Integer logprobs; + private LogProbs logprobs; @JsonProperty("finish_reason") private String finishReason; diff --git a/openai-client/src/main/java/com/hw/openai/entity/completions/LogProbs.java b/openai-client/src/main/java/com/hw/openai/entity/completions/LogProbs.java new file mode 100644 index 000000000..65944e888 --- /dev/null +++ b/openai-client/src/main/java/com/hw/openai/entity/completions/LogProbs.java @@ -0,0 +1,25 @@ +package com.hw.openai.entity.completions; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * @author HamaWhite + */ +@Data +public class LogProbs { + + List tokens; + + @JsonProperty("token_logprobs") + List tokenLogprobs; + + @JsonProperty("top_logprobs") + List> topLogprobs; + + @JsonProperty("text_offset") + List textOffset; +}