Skip to content

Commit 9261220

Browse files
committed
docs
1 parent f13af6d commit 9261220

File tree

4 files changed

+37
-4
lines changed

4 files changed

+37
-4
lines changed

src/main/kotlin/com/cjcrafter/openai/threads/ModifyThreadRequest.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ data class ModifyThreadRequest(
3636
}
3737

3838
companion object {
39+
40+
/**
41+
* Creates a new [ModifyThreadRequest] builder.
42+
*/
3943
@JvmStatic
4044
fun builder() = Builder()
4145
}

src/main/kotlin/com/cjcrafter/openai/threads/runs/Run.kt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ package com.cjcrafter.openai.threads.runs
33
import com.cjcrafter.openai.chat.tool.Tool
44
import com.fasterxml.jackson.annotation.JsonProperty
55

6+
/**
7+
* Represents a run object returned by the OpenAI API. The run object itself
8+
* isn't highly useful for most applications, but it is used to retrieve the
9+
* messages from the run via [RunStep]s.
10+
*
11+
* @property id The unique id of the run, used for retrieving the run
12+
* @property createdAt The unix timestamp of when the run was created
13+
* @property threadId The id of the thread that the run belongs to
14+
* @property assistantId The id of the assistant which is handling the run
15+
* @property status The current status of the run
16+
* @property requiredAction The required action for the run, if any
17+
* @property lastError The last error associated with the run, if any
18+
* @property expiresAt The unix timestamp of when the run will expire
19+
* @property startedAt The unix timestamp of when the run started
20+
* @property cancelledAt The unix timestamp of when the run was cancelled
21+
* @property failedAt The unix timestamp of when the run failed
22+
* @property completedAt The unix timestamp of when the run completed
23+
* @property model The model used for the run
24+
* @property instructions The instructions used for the run
25+
* @property tools The tools used for the run
26+
* @property fileIds The file ids used for the run
27+
* @property metadata The metadata associated with the run
28+
*/
629
data class Run(
730
@JsonProperty(required = true) val id: String,
831
@JsonProperty("created_at", required = true) val createdAt: Int,

src/main/kotlin/com/cjcrafter/openai/threads/runs/RunHandler.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ interface RunHandler {
7878
fun steps(run: Run): RunStepHandler = steps(run.id)
7979

8080
/**
81-
*
82-
*
83-
* @param id
84-
* @return
81+
* Gets the steps handler for the run with the given id.
8582
*/
8683
fun steps(id: String): RunStepHandler
8784
}

src/main/kotlin/com/cjcrafter/openai/threads/runs/SubmitToolOutputs.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
package com.cjcrafter.openai.threads.runs
22

3+
import com.cjcrafter.openai.assistants.Assistant
34
import com.cjcrafter.openai.util.OpenAIDslMarker
45
import com.fasterxml.jackson.annotation.JsonProperty
56

7+
/**
8+
* A data class holding your tool's outputs. Used after an [Assistant] makes
9+
* a tool call.
10+
*/
611
data class SubmitToolOutputs(
712
@JsonProperty("tool_outputs") var toolOutputs: MutableList<ToolCallOutputs>,
813
) {
@@ -23,6 +28,10 @@ data class SubmitToolOutputs(
2328
}
2429

2530
companion object {
31+
32+
/**
33+
* Creates a new [SubmitToolOutputs] builder.
34+
*/
2635
@JvmStatic
2736
fun builder() = Builder()
2837
}

0 commit comments

Comments
 (0)