From 07dea37981d8e896b6e5f8ecacd609e79e2004d9 Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Thu, 7 Mar 2024 09:02:11 +0100 Subject: [PATCH] Update documentation --- docs/ChatGptNet.Models/OpenAIChatGptModels.md | 8 +-- .../{Gpt35Turbo.md => Gpt35_Turbo.md} | 6 +- .../{Gpt35Turbo_16k.md => Gpt35_Turbo_16k.md} | 8 +-- ...ision_Preview.md => Gpt4Vision_Preview.md} | 6 +- ..._1106_Preview.md => Gpt4_Turbo_Preview.md} | 6 +- ...atGptFactoryServiceCollectionExtensions.md | 20 ++++++ .../AddChatGptClientFactory.md | 25 +++++++ docs/ChatGptNet/ChatGptOptions.md | 2 +- .../ChatGptNet/ChatGptOptions/DefaultModel.md | 2 +- docs/ChatGptNet/ChatGptOptionsBuilder.md | 6 +- .../ChatGptOptionsBuilder.md | 2 +- .../DefaultEmbeddingParameters.md | 2 +- .../ChatGptOptionsBuilder/DefaultModel.md | 2 +- .../UseAzure.md | 2 +- docs/ChatGptNet/IChatGptClientFactory.md | 21 ++++++ .../IChatGptClientFactory/CreateClient.md | 69 +++++++++++++++++++ docs/README.md | 2 + 17 files changed, 163 insertions(+), 26 deletions(-) rename docs/ChatGptNet.Models/OpenAIChatGptModels/{Gpt35Turbo.md => Gpt35_Turbo.md} (78%) rename docs/ChatGptNet.Models/OpenAIChatGptModels/{Gpt35Turbo_16k.md => Gpt35_Turbo_16k.md} (54%) rename docs/ChatGptNet.Models/OpenAIChatGptModels/{Gpt4_Vision_Preview.md => Gpt4Vision_Preview.md} (76%) rename docs/ChatGptNet.Models/OpenAIChatGptModels/{Gpt4_1106_Preview.md => Gpt4_Turbo_Preview.md} (78%) create mode 100644 docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md create mode 100644 docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions/AddChatGptClientFactory.md create mode 100644 docs/ChatGptNet/IChatGptClientFactory.md create mode 100644 docs/ChatGptNet/IChatGptClientFactory/CreateClient.md diff --git a/docs/ChatGptNet.Models/OpenAIChatGptModels.md b/docs/ChatGptNet.Models/OpenAIChatGptModels.md index eeafac4..7ac7eb0 100644 --- a/docs/ChatGptNet.Models/OpenAIChatGptModels.md +++ b/docs/ChatGptNet.Models/OpenAIChatGptModels.md @@ -10,12 +10,12 @@ public static class OpenAIChatGptModels | name | description | | --- | --- | -| const [Gpt35Turbo](OpenAIChatGptModels/Gpt35Turbo.md) | GPT-3.5 model can understand and generate natural language or code and it is optimized for chat. | -| const [Gpt35Turbo_16k](OpenAIChatGptModels/Gpt35Turbo_16k.md) | A model with the same capabilities as the standard [`Gpt35Turbo`](./OpenAIChatGptModels/Gpt35Turbo.md) model but with 4 times the token limit of [`Gpt35Turbo`](./OpenAIChatGptModels/Gpt35Turbo.md). | +| const [Gpt35_Turbo](OpenAIChatGptModels/Gpt35_Turbo.md) | GPT-3.5 model can understand and generate natural language or code and it is optimized for chat. | +| const [Gpt35_Turbo_16k](OpenAIChatGptModels/Gpt35_Turbo_16k.md) | A model with the same capabilities as the standard [`Gpt35_Turbo`](./OpenAIChatGptModels/Gpt35_Turbo.md) model but with 4 times the token limit of [`Gpt35_Turbo`](./OpenAIChatGptModels/Gpt35_Turbo.md). | | const [Gpt4](OpenAIChatGptModels/Gpt4.md) | GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy than any of our previous models, thanks to its broader general knowledge and advanced reasoning capabilities. is optimized for chat but works well for traditional completions tasks. | -| const [Gpt4_1106_Preview](OpenAIChatGptModels/Gpt4_1106_Preview.md) | The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. | +| const [Gpt4Vision_Preview](OpenAIChatGptModels/Gpt4Vision_Preview.md) | Ability to understand images, in addition to all other GPT-4 Turbo capabilties. | | const [Gpt4_32k](OpenAIChatGptModels/Gpt4_32k.md) | A model with the same capabilities as the base [`Gpt4`](./OpenAIChatGptModels/Gpt4.md) model but with 4 times the token limit of [`Gpt4`](./OpenAIChatGptModels/Gpt4.md). | -| const [Gpt4_Vision_Preview](OpenAIChatGptModels/Gpt4_Vision_Preview.md) | Ability to understand images, in addition to all other GPT-4 Turbo capabilties. | +| const [Gpt4_Turbo_Preview](OpenAIChatGptModels/Gpt4_Turbo_Preview.md) | The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. | ## Remarks diff --git a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md similarity index 78% rename from docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md rename to docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md index dc5cfd6..a743e5e 100644 --- a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md +++ b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md @@ -1,9 +1,9 @@ -# OpenAIChatGptModels.Gpt35Turbo field +# OpenAIChatGptModels.Gpt35_Turbo field GPT-3.5 model can understand and generate natural language or code and it is optimized for chat. ```csharp -public const string Gpt35Turbo; +public const string Gpt35_Turbo; ``` ## Remarks @@ -12,7 +12,7 @@ This model supports 4.096 tokens. See [GPT-3.5](https://platform.openai.com/docs ## See Also -* field [Gpt35Turbo_16k](./Gpt35Turbo_16k.md) +* field [Gpt35_Turbo_16k](./Gpt35_Turbo_16k.md) * class [OpenAIChatGptModels](../OpenAIChatGptModels.md) * namespace [ChatGptNet.Models](../../ChatGptNet.md) diff --git a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo_16k.md b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo_16k.md similarity index 54% rename from docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo_16k.md rename to docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo_16k.md index e47286b..74cce41 100644 --- a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo_16k.md +++ b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo_16k.md @@ -1,9 +1,9 @@ -# OpenAIChatGptModels.Gpt35Turbo_16k field +# OpenAIChatGptModels.Gpt35_Turbo_16k field -A model with the same capabilities as the standard [`Gpt35Turbo`](./Gpt35Turbo.md) model but with 4 times the token limit of [`Gpt35Turbo`](./Gpt35Turbo.md). +A model with the same capabilities as the standard [`Gpt35_Turbo`](./Gpt35_Turbo.md) model but with 4 times the token limit of [`Gpt35_Turbo`](./Gpt35_Turbo.md). ```csharp -public const string Gpt35Turbo_16k; +public const string Gpt35_Turbo_16k; ``` ## Remarks @@ -12,7 +12,7 @@ This model supports 16.384 tokens. See [GPT-3.5](https://platform.openai.com/doc ## See Also -* field [Gpt35Turbo](./Gpt35Turbo.md) +* field [Gpt35_Turbo](./Gpt35_Turbo.md) * class [OpenAIChatGptModels](../OpenAIChatGptModels.md) * namespace [ChatGptNet.Models](../../ChatGptNet.md) diff --git a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_Vision_Preview.md b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4Vision_Preview.md similarity index 76% rename from docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_Vision_Preview.md rename to docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4Vision_Preview.md index 453200c..3cf708f 100644 --- a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_Vision_Preview.md +++ b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4Vision_Preview.md @@ -1,14 +1,14 @@ -# OpenAIChatGptModels.Gpt4_Vision_Preview field +# OpenAIChatGptModels.Gpt4Vision_Preview field Ability to understand images, in addition to all other GPT-4 Turbo capabilties. ```csharp -public const string Gpt4_Vision_Preview; +public const string Gpt4Vision_Preview; ``` ## Remarks -This model supports 128.000 tokens and returns a maximum if 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information. +This model supports 128.000 tokens and returns a maximum of 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information. ## See Also diff --git a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_1106_Preview.md b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_Turbo_Preview.md similarity index 78% rename from docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_1106_Preview.md rename to docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_Turbo_Preview.md index 3325d12..25b03a0 100644 --- a/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_1106_Preview.md +++ b/docs/ChatGptNet.Models/OpenAIChatGptModels/Gpt4_Turbo_Preview.md @@ -1,14 +1,14 @@ -# OpenAIChatGptModels.Gpt4_1106_Preview field +# OpenAIChatGptModels.Gpt4_Turbo_Preview field The latest GPT-4 model with improved instruction following, JSON mode, reproducible outputs, parallel function calling, and more. ```csharp -public const string Gpt4_1106_Preview; +public const string Gpt4_Turbo_Preview; ``` ## Remarks -This model supports 128.000 tokens and returns a maximum if 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information. +This model supports 128.000 tokens and returns a maximum of 4.096 outpout tokens. This preview model is not yet suited for production traffic. See [GPT-4](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) for more information. ## See Also diff --git a/docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md b/docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md new file mode 100644 index 0000000..8f4dd52 --- /dev/null +++ b/docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md @@ -0,0 +1,20 @@ +# ChatGptFactoryServiceCollectionExtensions class + +Provides extension methods for adding ChatGPT Client Factory support in NET applications. + +```csharp +public static class ChatGptFactoryServiceCollectionExtensions +``` + +## Public Members + +| name | description | +| --- | --- | +| static [AddChatGptClientFactory](ChatGptFactoryServiceCollectionExtensions/AddChatGptClientFactory.md)(…) | Registers a ChatGptClientFactory instance. | + +## See Also + +* namespace [ChatGptNet](../ChatGptNet.md) +* [ChatGptFactoryServiceCollectionExtensions.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.cs) + + diff --git a/docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions/AddChatGptClientFactory.md b/docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions/AddChatGptClientFactory.md new file mode 100644 index 0000000..3c3f70a --- /dev/null +++ b/docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions/AddChatGptClientFactory.md @@ -0,0 +1,25 @@ +# ChatGptFactoryServiceCollectionExtensions.AddChatGptClientFactory method + +Registers a ChatGptClientFactory instance. + +```csharp +public static IServiceCollection AddChatGptClientFactory(this IServiceCollection services, + Action? builder = null) +``` + +| parameter | description | +| --- | --- | +| services | The IServiceCollection to add services to. | +| builder | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). | + +## Return Value + +A reference to this instance after the operation has completed. + +## See Also + +* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md) +* class [ChatGptFactoryServiceCollectionExtensions](../ChatGptFactoryServiceCollectionExtensions.md) +* namespace [ChatGptNet](../../ChatGptNet.md) + + diff --git a/docs/ChatGptNet/ChatGptOptions.md b/docs/ChatGptNet/ChatGptOptions.md index eaa3a51..d645523 100644 --- a/docs/ChatGptNet/ChatGptOptions.md +++ b/docs/ChatGptNet/ChatGptOptions.md @@ -13,7 +13,7 @@ public class ChatGptOptions | [ChatGptOptions](ChatGptOptions/ChatGptOptions.md)() | The default constructor. | | [DefaultEmbeddingModel](ChatGptOptions/DefaultEmbeddingModel.md) { get; set; } | Gets or sets the default model for embedding. (default: [`TextEmbeddingAda002`](../ChatGptNet.Models.Embeddings/OpenAIEmbeddingModels/TextEmbeddingAda002.md) when the provider is OpenAI). | | [DefaultEmbeddingParameters](ChatGptOptions/DefaultEmbeddingParameters.md) { get; } | Gets or sets the default parameters for embeddings. | -| [DefaultModel](ChatGptOptions/DefaultModel.md) { get; set; } | Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI). | +| [DefaultModel](ChatGptOptions/DefaultModel.md) { get; set; } | Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI). | | [DefaultParameters](ChatGptOptions/DefaultParameters.md) { get; } | Gets or sets the default parameters for chat completion. | | [MessageExpiration](ChatGptOptions/MessageExpiration.md) { get; set; } | Gets or sets the expiration for cached conversation messages (default: 1 hour). | | [MessageLimit](ChatGptOptions/MessageLimit.md) { get; set; } | Gets or sets the maximum number of messages to use for chat completion (default: 10). | diff --git a/docs/ChatGptNet/ChatGptOptions/DefaultModel.md b/docs/ChatGptNet/ChatGptOptions/DefaultModel.md index a48b573..8539de2 100644 --- a/docs/ChatGptNet/ChatGptOptions/DefaultModel.md +++ b/docs/ChatGptNet/ChatGptOptions/DefaultModel.md @@ -1,6 +1,6 @@ # ChatGptOptions.DefaultModel property -Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI). +Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI). ```csharp public string? DefaultModel { get; set; } diff --git a/docs/ChatGptNet/ChatGptOptionsBuilder.md b/docs/ChatGptNet/ChatGptOptionsBuilder.md index 935b69b..16416a8 100644 --- a/docs/ChatGptNet/ChatGptOptionsBuilder.md +++ b/docs/ChatGptNet/ChatGptOptionsBuilder.md @@ -10,10 +10,10 @@ public class ChatGptOptionsBuilder | name | description | | --- | --- | -| [ChatGptOptionsBuilder](ChatGptOptionsBuilder/ChatGptOptionsBuilder.md)() | The default constructor. | +| [ChatGptOptionsBuilder](ChatGptOptionsBuilder/ChatGptOptionsBuilder.md)() | Initializes a new instance of the [`ChatGptOptionsBuilder`](./ChatGptOptionsBuilder.md) class. | | [DefaultEmbeddingModel](ChatGptOptionsBuilder/DefaultEmbeddingModel.md) { get; set; } | Gets or sets the default model for embeddings. (default: [`TextEmbeddingAda002`](../ChatGptNet.Models.Embeddings/OpenAIEmbeddingModels/TextEmbeddingAda002.md) when the provider is OpenAI). | -| [DefaultEmbeddingParameters](ChatGptOptionsBuilder/DefaultEmbeddingParameters.md) { get; } | Gets or sets the default parameters for embeddings. | -| [DefaultModel](ChatGptOptionsBuilder/DefaultModel.md) { get; set; } | Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI). | +| [DefaultEmbeddingParameters](ChatGptOptionsBuilder/DefaultEmbeddingParameters.md) { get; set; } | Gets or sets the default parameters for embeddings. | +| [DefaultModel](ChatGptOptionsBuilder/DefaultModel.md) { get; set; } | Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI). | | [DefaultParameters](ChatGptOptionsBuilder/DefaultParameters.md) { get; set; } | Gets or sets the default parameters for chat completion. | | [MessageExpiration](ChatGptOptionsBuilder/MessageExpiration.md) { get; set; } | Gets or sets the expiration for cached conversation messages (default: 1 hour). | | [MessageLimit](ChatGptOptionsBuilder/MessageLimit.md) { get; set; } | Gets or sets the maximum number of messages to use for chat completion (default: 10). | diff --git a/docs/ChatGptNet/ChatGptOptionsBuilder/ChatGptOptionsBuilder.md b/docs/ChatGptNet/ChatGptOptionsBuilder/ChatGptOptionsBuilder.md index 367bbcf..45b00de 100644 --- a/docs/ChatGptNet/ChatGptOptionsBuilder/ChatGptOptionsBuilder.md +++ b/docs/ChatGptNet/ChatGptOptionsBuilder/ChatGptOptionsBuilder.md @@ -1,6 +1,6 @@ # ChatGptOptionsBuilder constructor -The default constructor. +Initializes a new instance of the [`ChatGptOptionsBuilder`](../ChatGptOptionsBuilder.md) class. ```csharp public ChatGptOptionsBuilder() diff --git a/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultEmbeddingParameters.md b/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultEmbeddingParameters.md index ce497e1..e038018 100644 --- a/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultEmbeddingParameters.md +++ b/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultEmbeddingParameters.md @@ -3,7 +3,7 @@ Gets or sets the default parameters for embeddings. ```csharp -public EmbeddingParameters DefaultEmbeddingParameters { get; } +public EmbeddingParameters DefaultEmbeddingParameters { get; set; } ``` ## See Also diff --git a/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultModel.md b/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultModel.md index b8eb99e..0d96d0a 100644 --- a/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultModel.md +++ b/docs/ChatGptNet/ChatGptOptionsBuilder/DefaultModel.md @@ -1,6 +1,6 @@ # ChatGptOptionsBuilder.DefaultModel property -Gets or sets the default model for chat completion. (default: [`Gpt35Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35Turbo.md) when the provider is OpenAI). +Gets or sets the default model for chat completion. (default: [`Gpt35_Turbo`](../../ChatGptNet.Models/OpenAIChatGptModels/Gpt35_Turbo.md) when the provider is OpenAI). ```csharp public string? DefaultModel { get; set; } diff --git a/docs/ChatGptNet/ChatGptOptionsBuilderExtensions/UseAzure.md b/docs/ChatGptNet/ChatGptOptionsBuilderExtensions/UseAzure.md index 1e488d7..02c7a55 100644 --- a/docs/ChatGptNet/ChatGptOptionsBuilderExtensions/UseAzure.md +++ b/docs/ChatGptNet/ChatGptOptionsBuilderExtensions/UseAzure.md @@ -4,7 +4,7 @@ Configures Azure OpenAI Service settings. ```csharp public static ChatGptOptionsBuilder UseAzure(this ChatGptOptionsBuilder builder, - string resourceName, string apiKey, string apiVersion = "2023-12-01-preview", + string resourceName, string apiKey, string apiVersion = "2024-02-15-preview", AzureAuthenticationType authenticationType = AzureAuthenticationType.ApiKey) ``` diff --git a/docs/ChatGptNet/IChatGptClientFactory.md b/docs/ChatGptNet/IChatGptClientFactory.md new file mode 100644 index 0000000..1ff1df4 --- /dev/null +++ b/docs/ChatGptNet/IChatGptClientFactory.md @@ -0,0 +1,21 @@ +# IChatGptClientFactory interface + +Provides methods to create new instances of [`IChatGptClient`](./IChatGptClient.md) at runtime + +```csharp +public interface IChatGptClientFactory +``` + +## Members + +| name | description | +| --- | --- | +| [CreateClient](IChatGptClientFactory/CreateClient.md)() | Creates a new instance of a ChatGptClient. | +| [CreateClient](IChatGptClientFactory/CreateClient.md)(…) | Creates a new instance of a ChatGptClient configured with the supplied action. (2 methods) | + +## See Also + +* namespace [ChatGptNet](../ChatGptNet.md) +* [IChatGptClientFactory.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/IChatGptClientFactory.cs) + + diff --git a/docs/ChatGptNet/IChatGptClientFactory/CreateClient.md b/docs/ChatGptNet/IChatGptClientFactory/CreateClient.md new file mode 100644 index 0000000..e61516e --- /dev/null +++ b/docs/ChatGptNet/IChatGptClientFactory/CreateClient.md @@ -0,0 +1,69 @@ +# IChatGptClientFactory.CreateClient method (1 of 3) + +Creates a new instance of a ChatGptClient. + +```csharp +public IChatGptClient CreateClient() +``` + +## Return Value + +A new [`IChatGptClient`](../IChatGptClient.md) + +## See Also + +* interface [IChatGptClient](../IChatGptClient.md) +* interface [IChatGptClientFactory](../IChatGptClientFactory.md) +* namespace [ChatGptNet](../../ChatGptNet.md) + +--- + +# IChatGptClientFactory.CreateClient method (2 of 3) + +Creates a new instance of a ChatGptClient configured with the supplied action. + +```csharp +public IChatGptClient CreateClient(Action? setupAction) +``` + +| parameter | description | +| --- | --- | +| setupAction | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). | + +## Return Value + +A new [`IChatGptClient`](../IChatGptClient.md) + +## See Also + +* interface [IChatGptClient](../IChatGptClient.md) +* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md) +* interface [IChatGptClientFactory](../IChatGptClientFactory.md) +* namespace [ChatGptNet](../../ChatGptNet.md) + +--- + +# IChatGptClientFactory.CreateClient method (3 of 3) + +Creates a new instance of a ChatGptClient configured with the supplied action. + +```csharp +public IChatGptClient CreateClient(Action? setupAction) +``` + +| parameter | description | +| --- | --- | +| setupAction | The Action to configure the provided [`ChatGptOptions`](../ChatGptOptions.md). | + +## Return Value + +A new [`IChatGptClient`](../IChatGptClient.md) + +## See Also + +* interface [IChatGptClient](../IChatGptClient.md) +* class [ChatGptOptionsBuilder](../ChatGptOptionsBuilder.md) +* interface [IChatGptClientFactory](../IChatGptClientFactory.md) +* namespace [ChatGptNet](../../ChatGptNet.md) + + diff --git a/docs/README.md b/docs/README.md index 6f45e14..06e28a5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,6 +5,7 @@ | public type | description | | --- | --- | | class [ChatGptBuilder](./ChatGptNet/ChatGptBuilder.md) | Represents the default builder for configuring ChatGPT. | +| static class [ChatGptFactoryServiceCollectionExtensions](./ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md) | Provides extension methods for adding ChatGPT Client Factory support in NET applications. | | class [ChatGptOptions](./ChatGptNet/ChatGptOptions.md) | Options class that provides settings for configuring ChatGPT. | | class [ChatGptOptionsBuilder](./ChatGptNet/ChatGptOptionsBuilder.md) | Builder class to define settings for configuring ChatGPT. | | static class [ChatGptOptionsBuilderExtensions](./ChatGptNet/ChatGptOptionsBuilderExtensions.md) | Provides extensions to configure settings for accessing ChatGPT service. | @@ -13,6 +14,7 @@ | static class [IChatGptBuilderExtensions](./ChatGptNet/IChatGptBuilderExtensions.md) | Provides extension methods for configuring ChatGPT after service creation. | | interface [IChatGptCache](./ChatGptNet/IChatGptCache.md) | Represents the interface used to define the caching behavior for ChatGPT messages. | | interface [IChatGptClient](./ChatGptNet/IChatGptClient.md) | Provides methods to interact with ChatGPT. | +| interface [IChatGptClientFactory](./ChatGptNet/IChatGptClientFactory.md) | Provides methods to create new instances of [`IChatGptClient`](./ChatGptNet/IChatGptClient.md) at runtime | ## ChatGptNet.Exceptions namespace