Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva committed Mar 7, 2024
1 parent bae94d7 commit 07dea37
Show file tree
Hide file tree
Showing 17 changed files with 163 additions and 26 deletions.
8 changes: 4 additions & 4 deletions docs/ChatGptNet.Models/OpenAIChatGptModels.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 20 additions & 0 deletions docs/ChatGptNet/ChatGptFactoryServiceCollectionExtensions.md
Original file line number Diff line number Diff line change
@@ -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)
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# ChatGptFactoryServiceCollectionExtensions.AddChatGptClientFactory method

Registers a ChatGptClientFactory instance.

```csharp
public static IServiceCollection AddChatGptClientFactory(this IServiceCollection services,
Action<ChatGptOptionsBuilder>? 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)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
2 changes: 1 addition & 1 deletion docs/ChatGptNet/ChatGptOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) { getset; } | 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) { getset; } | 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) { getset; } | Gets or sets the expiration for cached conversation messages (default: 1 hour). |
| [MessageLimit](ChatGptOptions/MessageLimit.md) { getset; } | Gets or sets the maximum number of messages to use for chat completion (default: 10). |
Expand Down
2 changes: 1 addition & 1 deletion docs/ChatGptNet/ChatGptOptions/DefaultModel.md
Original file line number Diff line number Diff line change
@@ -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; }
Expand Down
6 changes: 3 additions & 3 deletions docs/ChatGptNet/ChatGptOptionsBuilder.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) { getset; } | 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) { getset} | Gets or sets the default parameters for embeddings. |
| [DefaultModel](ChatGptOptionsBuilder/DefaultModel.md) { getset; } | 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) { getset; } | Gets or sets the default parameters for chat completion. |
| [MessageExpiration](ChatGptOptionsBuilder/MessageExpiration.md) { getset; } | Gets or sets the expiration for cached conversation messages (default: 1 hour). |
| [MessageLimit](ChatGptOptionsBuilder/MessageLimit.md) { getset; } | Gets or sets the maximum number of messages to use for chat completion (default: 10). |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ChatGptOptionsBuilder constructor

The default constructor.
Initializes a new instance of the [`ChatGptOptionsBuilder`](../ChatGptOptionsBuilder.md) class.

```csharp
public ChatGptOptionsBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Gets or sets the default parameters for embeddings.

```csharp
public EmbeddingParameters DefaultEmbeddingParameters { get; }
public EmbeddingParameters DefaultEmbeddingParameters { get; set; }
```

## See Also
Expand Down
2 changes: 1 addition & 1 deletion docs/ChatGptNet/ChatGptOptionsBuilder/DefaultModel.md
Original file line number Diff line number Diff line change
@@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down
21 changes: 21 additions & 0 deletions docs/ChatGptNet/IChatGptClientFactory.md
Original file line number Diff line number Diff line change
@@ -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)
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
69 changes: 69 additions & 0 deletions docs/ChatGptNet/IChatGptClientFactory/CreateClient.md
Original file line number Diff line number Diff line change
@@ -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<ChatGptOptionsBuilder>? 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<IServiceProvider, ChatGptOptionsBuilder>? 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)

<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll -->
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand All @@ -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

Expand Down

0 comments on commit 07dea37

Please sign in to comment.