Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add New Structured Response Feature On Assistant Creation #391

Merged
merged 8 commits into from
Oct 26, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add new fields into run
  • Loading branch information
ahmedharis994 committed Jul 15, 2024
commit 36a796e140d0ec48f418c0735e879efef1cac2f9
27 changes: 27 additions & 0 deletions openai-core/src/commonMain/kotlin/com.aallam.openai.api/run/Run.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.aallam.openai.api.core.Status
import com.aallam.openai.api.model.ModelId
import com.aallam.openai.api.thread.ThreadId
import com.aallam.openai.api.core.LastError
import com.aallam.openai.api.core.Usage
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand Down Expand Up @@ -102,4 +103,30 @@ public data class Run(
* Keys can be a maximum of 64 characters long, and values can be a maximum of 512 characters long.
*/
@SerialName("metadata") val metadata: Map<String, String>? = null,

/**
* Usage statistics related to the run.
* This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).
*/
@SerialName("usage") public val usage: Usage? = null,

/**
* The Unix timestamp (in seconds) for when the run was completed.
*/
@SerialName("temperature") val temperature: Int? = null,

/**
* The nucleus sampling value used for this run. If not set, defaults to 1.
*/
@SerialName("top_p") val topP: Int? = null,

/**
* The maximum number of prompt tokens specified to have been used over the course of the run.
*/
@SerialName("max_prompt_tokens") val maxPromptTokens: Int? = null,

/**
* The maximum number of completion tokens specified to have been used over the course of the run.
*/
@SerialName("max_completion_tokens") val maxCompletionTokens: Int? = null,
)
Loading