Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions ai-logic/firebase-ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

- [feature] Added static factory methods `create` for `Part` implementations to expose `thoughtSignature` and `isThought` properties. (#8352)

# 17.13.0

- [feature] Expanded `SpeechConfig` to support `MultiSpeakerVoiceConfig` and `LanguageCode`.
Expand Down
102 changes: 102 additions & 0 deletions ai-logic/firebase-ai/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,25 @@ package com.google.firebase.ai.type {

public final class CodeExecutionResultPart implements com.google.firebase.ai.type.Part {
ctor @Deprecated public CodeExecutionResultPart(String outcome, String output);
method @Deprecated public static com.google.firebase.ai.type.CodeExecutionResultPart create(String outcome, String output);
method @Deprecated public static com.google.firebase.ai.type.CodeExecutionResultPart create(String outcome, String output, boolean isThought = false);
method @Deprecated public static com.google.firebase.ai.type.CodeExecutionResultPart create(String outcome, String output, boolean isThought = false, String? thoughtSignature = null);
method public boolean executionSucceeded();
method public String getOutcome();
method public String getOutput();
method public String? getThoughtSignature();
method public boolean isThought();
property public boolean isThought;
property public final String outcome;
property public final String output;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.CodeExecutionResultPart.Companion Companion;
}

public static final class CodeExecutionResultPart.Companion {
method @Deprecated public com.google.firebase.ai.type.CodeExecutionResultPart create(String outcome, String output);
method @Deprecated public com.google.firebase.ai.type.CodeExecutionResultPart create(String outcome, String output, boolean isThought = false);
method @Deprecated public com.google.firebase.ai.type.CodeExecutionResultPart create(String outcome, String output, boolean isThought = false, String? thoughtSignature = null);
}

public final class Content {
Expand Down Expand Up @@ -552,22 +564,46 @@ package com.google.firebase.ai.type {

public final class ExecutableCodePart implements com.google.firebase.ai.type.Part {
ctor @Deprecated public ExecutableCodePart(String language, String code);
method @Deprecated public static com.google.firebase.ai.type.ExecutableCodePart create(String language, String code);
method @Deprecated public static com.google.firebase.ai.type.ExecutableCodePart create(String language, String code, boolean isThought = false);
method @Deprecated public static com.google.firebase.ai.type.ExecutableCodePart create(String language, String code, boolean isThought = false, String? thoughtSignature = null);
method public String getCode();
method public String getLanguage();
method public String? getThoughtSignature();
method public boolean isThought();
property public final String code;
property public boolean isThought;
property public final String language;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.ExecutableCodePart.Companion Companion;
}

public static final class ExecutableCodePart.Companion {
method @Deprecated public com.google.firebase.ai.type.ExecutableCodePart create(String language, String code);
method @Deprecated public com.google.firebase.ai.type.ExecutableCodePart create(String language, String code, boolean isThought = false);
method @Deprecated public com.google.firebase.ai.type.ExecutableCodePart create(String language, String code, boolean isThought = false, String? thoughtSignature = null);
}

public final class FileDataPart implements com.google.firebase.ai.type.Part {
ctor public FileDataPart(String uri, String mimeType);
method public static com.google.firebase.ai.type.FileDataPart create(String uri, String mimeType);
method public static com.google.firebase.ai.type.FileDataPart create(String uri, String mimeType, boolean isThought = false);
method public static com.google.firebase.ai.type.FileDataPart create(String uri, String mimeType, boolean isThought = false, String? thoughtSignature = null);
method public String getMimeType();
method public String? getThoughtSignature();
method public String getUri();
method public boolean isThought();
property public boolean isThought;
property public final String mimeType;
property public final String? thoughtSignature;
property public final String uri;
field public static final com.google.firebase.ai.type.FileDataPart.Companion Companion;
}

public static final class FileDataPart.Companion {
method public com.google.firebase.ai.type.FileDataPart create(String uri, String mimeType);
method public com.google.firebase.ai.type.FileDataPart create(String uri, String mimeType, boolean isThought = false);
method public com.google.firebase.ai.type.FileDataPart create(String uri, String mimeType, boolean isThought = false, String? thoughtSignature = null);
}

public final class FinishReason {
Expand Down Expand Up @@ -623,14 +659,28 @@ package com.google.firebase.ai.type {
public final class FunctionCallPart implements com.google.firebase.ai.type.Part {
ctor public FunctionCallPart(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args);
ctor public FunctionCallPart(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null);
method public static com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args);
method public static com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null);
method public static com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null, boolean isThought = false);
method public static com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null, boolean isThought = false, String? thoughtSignature = null);
method public java.util.Map<java.lang.String,kotlinx.serialization.json.JsonElement> getArgs();
method public String? getId();
method public String getName();
method public String? getThoughtSignature();
method public boolean isThought();
property public final java.util.Map<java.lang.String,kotlinx.serialization.json.JsonElement> args;
property public final String? id;
property public boolean isThought;
property public final String name;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.FunctionCallPart.Companion Companion;
}

public static final class FunctionCallPart.Companion {
method public com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args);
method public com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null);
method public com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null, boolean isThought = false);
method public com.google.firebase.ai.type.FunctionCallPart create(String name, java.util.Map<java.lang.String,? extends kotlinx.serialization.json.JsonElement> args, String? id = null, boolean isThought = false, String? thoughtSignature = null);
}

public final class FunctionCallingConfig {
Expand All @@ -656,20 +706,32 @@ package com.google.firebase.ai.type {
ctor public FunctionResponsePart(String name, kotlinx.serialization.json.JsonObject response);
ctor public FunctionResponsePart(String name, kotlinx.serialization.json.JsonObject response, String? id = null);
ctor public FunctionResponsePart(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList());
method public static com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response);
method public static com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null);
method public static com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList());
method public static com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList(), boolean isThought = false);
method public static com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList(), boolean isThought = false, String? thoughtSignature = null);
method public String? getId();
method public String getName();
method public java.util.List<com.google.firebase.ai.type.Part> getParts();
method public kotlinx.serialization.json.JsonObject getResponse();
method public String? getThoughtSignature();
method public boolean isThought();
property public final String? id;
property public boolean isThought;
property public final String name;
property public final java.util.List<com.google.firebase.ai.type.Part> parts;
property public final kotlinx.serialization.json.JsonObject response;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.FunctionResponsePart.Companion Companion;
}

public static final class FunctionResponsePart.Companion {
method public com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response);
method public com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null);
method public com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList());
method public com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList(), boolean isThought = false);
method public com.google.firebase.ai.type.FunctionResponsePart create(String name, kotlinx.serialization.json.JsonObject response, String? id = null, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList(), boolean isThought = false, String? thoughtSignature = null);
method public com.google.firebase.ai.type.FunctionResponsePart from(kotlinx.serialization.json.JsonObject jsonObject, java.util.List<? extends com.google.firebase.ai.type.Part> parts = emptyList());
}

Expand Down Expand Up @@ -920,12 +982,26 @@ package com.google.firebase.ai.type {
public final class ImagePart implements com.google.firebase.ai.type.Part {
ctor public ImagePart(android.graphics.Bitmap image);
ctor public ImagePart(android.graphics.Bitmap image, String displayName);
method public static com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image);
method public static com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image, String? displayName = null);
method public static com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image, String? displayName = null, boolean isThought = false);
method public static com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image, String? displayName = null, boolean isThought = false, String? thoughtSignature = null);
method public String? getDisplayName();
method public android.graphics.Bitmap getImage();
method public String? getThoughtSignature();
method public boolean isThought();
property public final String? displayName;
property public final android.graphics.Bitmap image;
property public boolean isThought;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.ImagePart.Companion Companion;
}

public static final class ImagePart.Companion {
method public com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image);
method public com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image, String? displayName = null);
method public com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image, String? displayName = null, boolean isThought = false);
method public com.google.firebase.ai.type.ImagePart create(android.graphics.Bitmap image, String? displayName = null, boolean isThought = false, String? thoughtSignature = null);
}

public final class ImageSize {
Expand Down Expand Up @@ -1171,14 +1247,28 @@ package com.google.firebase.ai.type {
public final class InlineDataPart implements com.google.firebase.ai.type.Part {
ctor public InlineDataPart(byte[] inlineData, String mimeType);
ctor public InlineDataPart(byte[] inlineData, String mimeType, String displayName);
method public static com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType);
method public static com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType, String? displayName = null);
method public static com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType, String? displayName = null, boolean isThought = false);
method public static com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType, String? displayName = null, boolean isThought = false, String? thoughtSignature = null);
method public String? getDisplayName();
method public byte[] getInlineData();
method public String getMimeType();
method public String? getThoughtSignature();
method public boolean isThought();
property public final String? displayName;
property public final byte[] inlineData;
property public boolean isThought;
property public final String mimeType;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.InlineDataPart.Companion Companion;
}

public static final class InlineDataPart.Companion {
method public com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType);
method public com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType, String? displayName = null);
method public com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType, String? displayName = null, boolean isThought = false);
method public com.google.firebase.ai.type.InlineDataPart create(byte[] inlineData, String mimeType, String? displayName = null, boolean isThought = false, String? thoughtSignature = null);
}

public final class InvalidAPIKeyException extends com.google.firebase.ai.type.FirebaseAIException {
Expand Down Expand Up @@ -1882,10 +1972,22 @@ package com.google.firebase.ai.type {

public final class TextPart implements com.google.firebase.ai.type.Part {
ctor public TextPart(String text);
method public static com.google.firebase.ai.type.TextPart create(String text);
method public static com.google.firebase.ai.type.TextPart create(String text, boolean isThought = false);
method public static com.google.firebase.ai.type.TextPart create(String text, boolean isThought = false, String? thoughtSignature = null);
method public String getText();
method public String? getThoughtSignature();
method public boolean isThought();
property public boolean isThought;
property public final String text;
property public final String? thoughtSignature;
field public static final com.google.firebase.ai.type.TextPart.Companion Companion;
}

public static final class TextPart.Companion {
method public com.google.firebase.ai.type.TextPart create(String text);
method public com.google.firebase.ai.type.TextPart create(String text, boolean isThought = false);
method public com.google.firebase.ai.type.TextPart create(String text, boolean isThought = false, String? thoughtSignature = null);
}

public final class ThinkingConfig {
Expand Down
2 changes: 1 addition & 1 deletion ai-logic/firebase-ai/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.

version=17.13.1
version=17.14.0
latestReleasedVersion=17.13.0
Loading
Loading