-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add usageMetadata
to GenerateContentResponse
in Vertex AI
#12777
Conversation
@@ -17,13 +17,28 @@ import Foundation | |||
/// The model's response to a generate content request. | |||
@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) | |||
public struct GenerateContentResponse { | |||
/// Token usage metadata for processing the generate content request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Shouldn't internal line-based comments be two slashes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to be very consistent about //
vs. ///
for internal
variables / constants (e.g.,
firebase-ios-sdk/FirebaseVertexAI/Sources/GenerativeModel.swift
Lines 25 to 47 in 3783c8a
/// The resource name of the model in the backend; has the format "models/model-name". | |
let modelResourceName: String | |
/// The backing service responsible for sending and receiving model requests to the backend. | |
let generativeAIService: GenerativeAIService | |
/// Configuration parameters used for the MultiModalModel. | |
let generationConfig: GenerationConfig? | |
/// The safety settings to be used for prompts. | |
let safetySettings: [SafetySetting]? | |
/// A list of tools the model may use to generate the next response. | |
let tools: [Tool]? | |
/// Tool configuration for any `Tool` specified in the request. | |
let toolConfig: ToolConfig? | |
/// Instructions that direct the model to behave a certain way. | |
let systemInstruction: ModelContent? | |
/// Configuration parameters for sending requests to the backend. | |
let requestOptions: RequestOptions |
public
(wasn't caught because the test uses @testable import
) and should remain ///
for DocC. Adding public
now.
Added
usageMetadata
toGenerateContentResponse
.#no-changelog