Skip to content
Merged
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: 1 addition & 1 deletion FirebaseVertexAI/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
instead of the `Any` type. (#13575)
- [added] Added support for specifying a JSON `responseSchema` in
`GenerationConfig`; see
[control generated output](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output)
[control generated output](https://firebase.google.com/docs/vertex-ai/structured-output?platform=ios)
for more details. (#13576)

# 10.29.0
Expand Down
2 changes: 1 addition & 1 deletion FirebaseVertexAI/Sources/CountTokensRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public struct CountTokensResponse {
/// The total number of billable characters in the text input given to the model as a prompt.
///
/// > Important: This does not include billable image, video or other non-text input. See
/// [Vertex AI pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing) for details.
/// [Vertex AI pricing](https://firebase.google.com/docs/vertex-ai/pricing) for details.
public let totalBillableCharacters: Int?

/// The breakdown, by modality, of how many tokens are consumed by the prompt.
Expand Down
4 changes: 2 additions & 2 deletions FirebaseVertexAI/Sources/FunctionCalling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ public struct Tool: Sendable {
/// Function calling can be used to provide data to the model that was not known at the time it
/// was trained (for example, the current date or weather conditions) or to allow it to interact
/// with external systems (for example, making an API request or querying/updating a database).
/// For more details and use cases, see [Introduction to function
/// calling](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling).
/// For more details and use cases, see [Function calling using the Gemini
/// API](http://firebase.google.com/docs/vertex-ai/function-calling?platform=ios).
///
/// - Parameters:
/// - functionDeclarations: A list of `FunctionDeclarations` available to the model that can be
Expand Down
13 changes: 7 additions & 6 deletions FirebaseVertexAI/Sources/GenerationConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,16 @@ public struct GenerationConfig: Sendable {
/// > of variation is still possible.
///
/// > Important: The range of supported temperature values depends on the model; see the
/// > [Cloud documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#generationconfig)
/// > [documentation](https://firebase.google.com/docs/vertex-ai/model-parameters?platform=ios#temperature)
/// > for more details.
/// - topP: Controls diversity of generated text. Higher values (e.g., 0.9) produce more diverse
/// text, while lower values (e.g., 0.5) make the output more focused.
///
/// The supported range is 0.0 to 1.0.
///
/// > Important: The default `topP` value depends on the model; see the
/// [Cloud documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#generationconfig)
/// for more details.
/// > [documentation](https://firebase.google.com/docs/vertex-ai/model-parameters?platform=ios#top-p)
/// > for more details.
/// - topK: Limits the number of highest probability words the model considers when generating
/// text. For example, a topK of 40 means only the 40 most likely words are considered for the
/// next token. A higher value increases diversity, while a lower value makes the output more
Expand All @@ -84,7 +84,7 @@ public struct GenerationConfig: Sendable {
/// The supported range is 1 to 40.
///
/// > Important: Support for `topK` and the default value depends on the model; see the
/// [Cloud documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#generationconfig)
/// [documentation](https://firebase.google.com/docs/vertex-ai/model-parameters?platform=ios#top-k)
/// for more details.
/// - candidateCount: The number of response variations to return; defaults to 1 if not set.
/// Support for multiple candidates depends on the model; see the
Expand Down Expand Up @@ -137,8 +137,9 @@ public struct GenerationConfig: Sendable {
/// - `application/json`: Schema for JSON response.
///
/// Refer to the
/// [Control generated output](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output)
/// guide for more details.
/// [Generate structured
/// output](https://firebase.google.com/docs/vertex-ai/structured-output?platform=ios) guide
/// for more details.
public init(temperature: Float? = nil, topP: Float? = nil, topK: Int? = nil,
candidateCount: Int? = nil, maxOutputTokens: Int? = nil,
presencePenalty: Float? = nil, frequencyPenalty: Float? = nil,
Expand Down
4 changes: 4 additions & 0 deletions FirebaseVertexAI/Sources/Safety.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ public struct SafetyRating: Equatable, Hashable, Sendable {

/// A type used to specify a threshold for harmful content, beyond which the model will return a
/// fallback response instead of generated content.
///
/// See [safety settings for Gemini
/// models](https://firebase.google.com/docs/vertex-ai/safety-settings?platform=ios#gemini) for
/// more details.
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
public struct SafetySetting: Sendable {
/// Block at and beyond a specified ``SafetyRating/HarmProbability``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
// limitations under the License.

/// Configuration options for generating images with Imagen.
///
/// See [Parameters for Imagen
/// models](https://firebase.google.com/docs/vertex-ai/model-parameters?platform=ios#imagen) to
/// learn about parameters available for use with Imagen models, including how to configure them.
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
public struct ImagenGenerationConfig {
/// Specifies elements to exclude from the generated image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import Foundation

/// Represents a remote Imagen model with the ability to generate images using text prompts.
///
/// See the [Cloud
/// documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/image/generate-images) for
/// more details about the image generation capabilities offered by the Imagen model.
/// See the [generate images
/// documentation](https://firebase.google.com/docs/vertex-ai/generate-images-imagen?platform=ios)
/// for more details about the image generation capabilities offered by the Imagen model in the
/// Vertex AI in Firebase SDK.
///
/// > Warning: For Vertex AI in Firebase, image generation using Imagen 3 models is in Public
/// Preview, which means that the feature is not subject to any SLA or deprecation policy and
Expand Down
6 changes: 3 additions & 3 deletions FirebaseVertexAI/Sources/Types/Public/Part.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ public struct FileDataPart: Part {
/// - uri: The `"gs://"`-prefixed URI of the file in Cloud Storage for Firebase, for example,
/// `"gs://bucket-name/path/image.jpg"`.
/// - mimeType: The IANA standard MIME type of the uploaded file, for example, `"image/jpeg"`
/// or `"video/mp4"`; see [media requirements
/// ](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-multimodal-prompts#media_requirements)
/// for supported values.
/// or `"video/mp4"`; see [supported input files and
/// requirements](https://firebase.google.com/docs/vertex-ai/input-file-requirements) for
/// supported values.
public init(uri: String, mimeType: String) {
self.init(FileData(fileURI: uri, mimeType: mimeType))
}
Expand Down
5 changes: 2 additions & 3 deletions FirebaseVertexAI/Sources/VertexAI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,8 @@ public class VertexAI {
///
/// - Parameters:
/// - modelName: The name of the Imagen 3 model to use, for example `"imagen-3.0-generate-002"`;
/// see [model
/// versions](https://cloud.google.com/vertex-ai/generative-ai/docs/image/model-versioning)
/// for a list of supported Imagen 3 models.
/// see [model versions](https://firebase.google.com/docs/vertex-ai/models) for a list of
/// supported Imagen 3 models.
/// - generationConfig: Configuration options for generating images with Imagen.
/// - safetySettings: Settings describing what types of potentially harmful content your model
/// should allow.
Expand Down
Loading