GenerativeLanguageBaseClient class

Constructors

GenerativeLanguageBaseClient({required String baseUrl, required Client client, String apiUrlPrefix = 'v1beta/', String? interactionsPath})

Properties

apiUrlPrefix → String
final
baseUrl → String
final
client → Client
final
hashCode → int
The hash code for this object.
no setterinherited
interactionsPath → String
The Interactions API path, relative to baseUrl. Defaults to ${apiUrlPrefix}interactions (the Gemini API's v1beta/interactions); the Gemini Enterprise Agent Platform's is under the project and location, not under the publisher models prefix.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createInteraction(CreateInteractionRequest request) → Future<GeminiInteraction>
Creates an interaction (Interactions API, steps schema).
createInteractionStream(CreateInteractionRequest request) → Stream<InteractionSseEvent>
Creates an interaction and streams its SSE events (stream: true is set on the request).
embedContent(EmbedContentRequest request, {required String model}) → Future<EmbedContentResponse>
generateContent(GenerateContentRequest request, {required String model}) → Future<GenerateContentResponse>
listModels({int? pageSize, String? pageToken}) → Future<ListModelsResponse>
listPublisherModels({required String projectId}) → Future<Map<String, dynamic>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
predict(Map<String, dynamic> request, {required String model}) → Future<Map<String, dynamic>>
streamGenerateContent(GenerateContentRequest request, {required String model}) → Stream<GenerateContentResponse>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited