#
Junjie
6 天以前 ff1aa7a9218e458dfd9255b1f87490af52afb62a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.zy.ai.entity;
 
import lombok.Data;
 
import java.util.List;
 
@Data
public class ChatCompletionRequest {
 
    private String model;
    private List<Message> messages;
    // 可选参数
    private Double temperature;
    private Integer max_tokens;
    private Boolean stream;
    private List<Object> tools;
    private Object tool_choice;
 
    @Data
    public static class Message {
        private String role;    // "user" / "assistant" / "system"
        private String content;
        private String name;
        private String tool_call_id;
        private List<ToolCall> tool_calls;
    }
 
    @Data
    public static class ToolCall {
        private String id;
        private String type;
        private Function function;
    }
 
    @Data
    public static class Function {
        private String name;
        private String arguments;
    }
}