Firebase. AI. TemplateGenerativeModel
A type that represents a remote multimodal model (like Gemini), with the ability to generate content based on defined server prompt templates.
Summary
Public functions |
|
|---|---|
GenerateContentAsync(string templateId, IDictionary< string, object > inputs, CancellationToken cancellationToken)
|
Task< GenerateContentResponse >
Generates new content by calling into a server prompt template.
|
GenerateContentStreamAsync(string templateId, IDictionary< string, object > inputs, CancellationToken cancellationToken)
|
IAsyncEnumerable< GenerateContentResponse >
Generates new content as a stream by calling into a server prompt template.
|
Public functions
GenerateContentAsync
Task< GenerateContentResponse > GenerateContentAsync( string templateId, IDictionary< string, object > inputs, CancellationToken cancellationToken )
Generates new content by calling into a server prompt template.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||
| Exceptions |
|
||||||
| Returns |
The generated content response from the model.
|
GenerateContentStreamAsync
IAsyncEnumerable< GenerateContentResponse > GenerateContentStreamAsync( string templateId, IDictionary< string, object > inputs, CancellationToken cancellationToken )
Generates new content as a stream by calling into a server prompt template.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
||||||
| Exceptions |
|
||||||
| Returns |
A stream of generated content responses from the model.
|