GeminiModel
public struct GeminiModelextension GeminiModel: LanguageModelA Gemini model accessed via the Gemini Developer API or the Vertex AI API.
Public Preview: This API is a public preview and may be subject to change.
To create a GeminiModel instance, see
geminiModel(name:safetySettings:requestOptions:).
-
Returns the name of the model.
Declaration
Swift
public var _modelName: String { get } -
Returns a new session for this model.
Declaration
Swift
public func _startSession(tools: [any ToolRepresentable]?, instructions: String?) throws -> any _ModelSession