File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed
src/main/kotlin/com/cjcrafter/openai/chat Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import com.google.gson.JsonObject
19
19
* @constructor Create a new chat choice, for internal usage.
20
20
* @see FinishReason
21
21
*/
22
- class ChatChoice (val index : Int , val message : ChatMessage , val finishReason : FinishReason ? ) {
22
+ data class ChatChoice (val index : Int , val message : ChatMessage , val finishReason : FinishReason ? ) {
23
23
24
24
/* *
25
25
* JSON constructor for internal usage.
Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ import com.google.gson.annotations.SerializedName
36
36
* @property user Who sent this request (for moderation).
37
37
* @constructor Create a chat request
38
38
* @see ChatBot.generateResponse
39
- * @see <a href="https://platform.openai.com/docs/api-reference/completions/create">OpenAI Uncyclo</a>
39
+ * @see <a href="https://platform.openai.com/docs/api-reference/completions/create">Chat API Reference</a>
40
+ * @see <a href="https://platform.openai.com/docs/guides/chat">Chat User Reference</a>
40
41
*/
41
42
data class ChatRequest @JvmOverloads constructor(
42
43
var model : String ,
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ import com.google.gson.JsonObject
13
13
* @param promptTokens How many tokens the input used.
14
14
* @param completionTokens How many tokens the output used.
15
15
* @param totalTokens How many tokens in total.
16
+ * @see <a href="https://platform.openai.com/docs/guides/chat/managing-tokens">Managing Tokens Guide</a>
16
17
*/
17
- class ChatUsage (val promptTokens : Int , val completionTokens : Int , val totalTokens : Int ) {
18
+ data class ChatUsage (val promptTokens : Int , val completionTokens : Int , val totalTokens : Int ) {
18
19
19
20
/* *
20
21
* JSON constructor for internal usage.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package com.cjcrafter.openai.chat
2
2
3
3
/* *
4
4
* [FinishReason] wraps the possible reasons that a generation model may stop
5
- * generating tokens. For most **PROPER** use cases (see [best practices]()),
5
+ * generating tokens. For most **PROPER** use cases (see [best practices](https://platform.openai.com/docs/guides/chat/introduction )),
6
6
* the finish reason will be [STOP]. When working with streams, finish reason
7
7
* will be `null` since it has not completed the message yet.
8
8
*/
You can’t perform that action at this time.
0 commit comments