public class ChatCompletion extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ChatCompletion.Model |
| Modifier and Type | Field and Description |
|---|---|
private double |
frequencyPenalty
-2.0 ~~ 2.0
|
(package private) String |
function_call
auto
|
(package private) List<ChatFunction> |
functions |
private Map |
logitBias |
private Integer |
maxTokens
3.5 最大支持4096
4.0 最大32k
|
private @NonNull List<Message> |
messages |
private @NonNull String |
model |
private Integer |
n
结果数。
|
private double |
presencePenalty |
private List<String> |
stop
停用词
|
private boolean |
stream
是否流式输出.
|
private double |
temperature
使用什么取样温度,0到2之间。越高越奔放。越低越保守。
|
private double |
topP
0-1
建议0.9
不要同时改这个和temperature
|
private String |
user
用户唯一值,确保接口不被重复调用
|
| Constructor and Description |
|---|
ChatCompletion() |
| Modifier and Type | Method and Description |
|---|---|
int |
countTokens() |
@NonNull private @NonNull String model
private double temperature
不要同时改这个和topP
private double topP
String function_call
List<ChatFunction> functions
private Integer n
private boolean stream
private Integer maxTokens
private double presencePenalty
private double frequencyPenalty
private Map logitBias
private String user
Copyright © 2023. All rights reserved.