public class ChatChoice extends Object
| Modifier and Type | Field and Description |
|---|---|
private Message |
delta
请求参数stream为true返回是delta
|
private String |
finishReason
The reason the model stopped generating tokens.
|
private Integer |
index |
private Message |
message
请求参数stream为false返回是message
|
| Constructor and Description |
|---|
ChatChoice() |
private Integer index
private Message delta
private Message message
private String finishReason
可能的值 stop:
模型达到了一个自然的停止点或遇到了提供的停止序列。 例如,生成的文本包含一个定义的停止序列(如 "END"),或者模型认为已经生成了一个完整的句子或段落。 length:
达到了请求中指定的最大令牌数。 例如,请求中设置了 max_tokens 为 50,当生成的令牌数量达到 50 时,模型停止生成。 content_filter:
由于内容过滤器的标志,部分内容被省略。 例如,生成的文本可能包含不适当的内容,触发了内容过滤器,导致生成过程提前终止。 tool_calls:
模型调用了一个工具。 这种情况通常用于增强模型的功能,如调用外部API或执行特定任务。
Copyright © 2024. All rights reserved.