GenerativeModel(String, ModelParams, HttpClient, ILogger) Constructor

Represents a generative AI model designed to handle text generation tasks with configurable settings, platform adapters, safety measures, and advanced functionalities such as function calling and content caching.

Definition

Namespace: GenerativeAI
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public GenerativeModel(
	string apiKey,
	ModelParams modelParams,
	HttpClient? client = null,
	ILogger? logger = null
)

Parameters

apiKey  String

[Missing <param name="apiKey"/> documentation for "M:GenerativeAI.GenerativeModel.#ctor(System.String,GenerativeAI.Core.ModelParams,System.Net.Http.HttpClient,Microsoft.Extensions.Logging.ILogger)"]

modelParams  ModelParams

[Missing <param name="modelParams"/> documentation for "M:GenerativeAI.GenerativeModel.#ctor(System.String,GenerativeAI.Core.ModelParams,System.Net.Http.HttpClient,Microsoft.Extensions.Logging.ILogger)"]

client  HttpClient  (Optional)

[Missing <param name="client"/> documentation for "M:GenerativeAI.GenerativeModel.#ctor(System.String,GenerativeAI.Core.ModelParams,System.Net.Http.HttpClient,Microsoft.Extensions.Logging.ILogger)"]

logger  ILogger  (Optional)
Optional logger for tracking and debugging operations.

Remarks

This class provides multiple constructors to support customization, enabling seamless integration with platform-specific APIs, safety configurations, and logging utilities.

See Also