GenerativeModel(IPlatformAdapter, String, GenerationConfig, ICollectionSafetySetting, String, HttpClient, ILogger) Constructor
Represents a generative AI model, providing functionality for text generation tasks.
Namespace: GenerativeAIAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public GenerativeModel(
IPlatformAdapter platform,
string? model,
GenerationConfig config = null,
ICollection<SafetySetting>? safetySettings = null,
string? systemInstruction = null,
HttpClient? httpClient = null,
ILogger? logger = null
)
Parameters
- platform IPlatformAdapter
- The platform adapter used for the generative AI model integration.
- model String
- The name or identifier of the model to be used.
- config GenerationConfig (Optional)
- Optional configuration for text generation, including settings like temperature and max tokens.
- safetySettings ICollectionSafetySetting (Optional)
- Optional collection of safety settings to ensure content generation adheres to desired guidelines.
- systemInstruction String (Optional)
- Optional instruction for the model, defining the initial prompt or system behavior.
- httpClient HttpClient (Optional)
- Optional HTTP client for API communication.
- logger ILogger (Optional)
- Optional logger instance for diagnostic and logging purposes.
Provides constructors for initializing the model with various configurations and integrates with platform-specific operations.