Skip to content

Commit 28f390e

Browse files
committed
update code execution instance
1 parent fc04b44 commit 28f390e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
model's internal reasoning process.
1414
- [fixed] Fixed an issue causing the accessor methods in `GenerateContentResponse` to throw an
1515
exception when the response contained no candidates.
16-
- [changed] Added better description for requests which fail due to the Gemini API not being configured.
16+
- [changed] Added better description for requests which fail due to the Gemini API not being
17+
configured.
1718

1819
* [changed] Added a `dilation` parameter to `ImagenMaskReference.generateMaskAndPadForOutpainting`
1920
(#7260)

firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ internal constructor(
4444
)
4545
public companion object {
4646

47+
private val codeExecutionInstance = Tool(null, null, JsonObject(emptyMap()))
48+
4749
/**
4850
* Creates a [Tool] instance that provides the model with access to the [functionDeclarations].
4951
*
@@ -57,7 +59,7 @@ internal constructor(
5759
/** Creates a [Tool] instance that allows the model to use Code Execution. */
5860
@JvmStatic
5961
public fun codeExecution(): Tool {
60-
return Tool(null, null, JsonObject(emptyMap()))
62+
return codeExecutionInstance
6163
}
6264

6365
/**

0 commit comments

Comments
 (0)