File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
firebase-ai/src/main/kotlin/com/google/firebase/ai/type Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,21 @@ public class TextPart(public val text: String) : Part {
39
39
@Serializable internal data class Internal (val text : String ) : InternalPart
40
40
}
41
41
42
- public class CodeExecutionResultPart (public val outcome : String , public val output : String ) : Part {
42
+ /* Represents the result of the code execution */
43
+ public enum class Outcome {
44
+ OUTCOME_UNSPECIFIED ,
45
+ OUTCOME_OK ,
46
+ OUTCOME_FAILED ,
47
+ OUTCOME_DEADLINE_EXCEEDED
48
+ }
49
+
50
+ /* *
51
+ * Represents the code execution result from the model.
52
+ * @property outcome The result of the execution.
53
+ * @property output The stdout from the code execution, or an error message if it failed.
54
+ */
55
+ public class CodeExecutionResultPart (public val outcome : Outcome , public val output : String ) :
56
+ Part {
43
57
44
58
@Serializable
45
59
internal data class Internal (
@@ -48,12 +62,17 @@ public class CodeExecutionResultPart(public val outcome: String, public val outp
48
62
49
63
@Serializable
50
64
internal data class CodeExecutionResult (
51
- @SerialName(" outcome" ) val outcome : String ,
65
+ @SerialName(" outcome" ) val outcome : Outcome ,
52
66
val output : String
53
67
)
54
68
}
55
69
}
56
70
71
+ /* *
72
+ * Represents the code that is executed by the model.
73
+ * @property language The programming language of the code.
74
+ * @property code The source code to be executed.
75
+ */
57
76
public class ExecutableCodePart (public val language : String , public val code : String ) : Part {
58
77
59
78
@Serializable
You can’t perform that action at this time.
0 commit comments