入参:
@Data
public class AskChatGPT16KParam {
private String model;
private List<AskChatGPTParam> messages;
private double temperature;
}
@Data
public class AskChatGPTParam {
private String role;
private String content;
}
出参:
@Data
public class AskChatGPT16KResult {
private int Code;
private int SubCode;
private String Msg;
private GPTChatCompletionsResponse Data;
}
@Data
public class GPTChatCompletionsResponse {
private long created;
private GPTChatCompletionsUsage usage;
private String model;
private String id;
private List<GPTChatCompletionsChoice> choices;
/**
* chat.completion 接口url
*/
private String object;
private GPTBaseError error;
}
@Data
public class GPTChatCompletionsUsage {
private int completion_tokens;
private int prompt_tokens;
private int total_tokens;
}
@Data
public class GPTChatCompletionsChoice {
private String finish_reason;
private int index;
private GPTChatCompletionsMessage message;
}
@Data
public class GPTChatCompletionsMessage {
private String content;
private String role;
}
@Data
public class GPTBaseError {
private String code;
private String message;
}