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
1919 * @constructor Create a new chat choice, for internal usage.
2020 * @see FinishReason
2121 */
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 ? ) {
2323
2424 /* *
2525 * 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
3636 * @property user Who sent this request (for moderation).
3737 * @constructor Create a chat request
3838 * @see ChatBot.generateResponse
39- * @see <a href="https://platform.openai.com/docs/api-reference/completions/create">OpenAI Wiki</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>
4041 */
4142data class ChatRequest @JvmOverloads constructor(
4243 var model : String ,
Original file line number Diff line number Diff line change @@ -13,8 +13,9 @@ import com.google.gson.JsonObject
1313 * @param promptTokens How many tokens the input used.
1414 * @param completionTokens How many tokens the output used.
1515 * @param totalTokens How many tokens in total.
16+ * @see <a href="https://platform.openai.com/docs/guides/chat/managing-tokens">Managing Tokens Guide</a>
1617 */
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 ) {
1819
1920 /* *
2021 * JSON constructor for internal usage.
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package com.cjcrafter.openai.chat
22
33/* *
44 * [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 )),
66 * the finish reason will be [STOP]. When working with streams, finish reason
77 * will be `null` since it has not completed the message yet.
88 */
You can’t perform that action at this time.
0 commit comments