-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
142 changed files
with
3,337 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ChatGptException class | ||
|
||
Represents errors that occur during API invocation. | ||
|
||
```csharp | ||
public class ChatGptException : HttpRequestException | ||
``` | ||
|
||
## Public Members | ||
|
||
| name | description | | ||
| --- | --- | | ||
| [ChatGptException](ChatGptException/ChatGptException.md)(…) | Initializes a new instance of the [`ChatGptException`](./ChatGptException.md) class with the specified *error* details. | | ||
| [Error](ChatGptException/Error.md) { get; } | Gets the detailed error information. | | ||
|
||
## See Also | ||
|
||
* namespace [ChatGptNet.Exceptions](../ChatGptNet.md) | ||
* [ChatGptException.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/Exceptions/ChatGptException.cs) | ||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
20 changes: 20 additions & 0 deletions
20
docs/ChatGptNet.Exceptions/ChatGptException/ChatGptException.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# ChatGptException constructor | ||
|
||
Initializes a new instance of the [`ChatGptException`](../ChatGptException.md) class with the specified *error* details. | ||
|
||
```csharp | ||
public ChatGptException(ChatGptError? error, HttpStatusCode statusCode) | ||
``` | ||
|
||
| parameter | description | | ||
| --- | --- | | ||
| error | The detailed error information | | ||
| statusCode | The HTTP status code | | ||
|
||
## See Also | ||
|
||
* class [ChatGptError](../../ChatGptNet.Models/ChatGptError.md) | ||
* class [ChatGptException](../ChatGptException.md) | ||
* namespace [ChatGptNet.Exceptions](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# ChatGptException.Error property | ||
|
||
Gets the detailed error information. | ||
|
||
```csharp | ||
public ChatGptError Error { get; } | ||
``` | ||
|
||
## See Also | ||
|
||
* class [ChatGptError](../../ChatGptNet.Models/ChatGptError.md) | ||
* class [ChatGptException](../ChatGptException.md) | ||
* namespace [ChatGptNet.Exceptions](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ChatGptResponseExtensions class | ||
|
||
Provides extension methods for the [`ChatGptResponse`](../ChatGptNet.Models/ChatGptResponse.md) class. | ||
|
||
```csharp | ||
public static class ChatGptResponseExtensions | ||
``` | ||
|
||
## Public Members | ||
|
||
| name | description | | ||
| --- | --- | | ||
| static [AsDeltas](ChatGptResponseExtensions/AsDeltas.md)(…) | Returns an IAsyncEnumerable that allows to enumerate all the partial message deltas. | | ||
|
||
## See Also | ||
|
||
* class [ChatGptResponse](../ChatGptNet.Models/ChatGptResponse.md) | ||
* namespace [ChatGptNet.Extensions](../ChatGptNet.md) | ||
* [ChatGptResponseExtensions.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/Extensions/ChatGptResponseExtensions.cs) | ||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
23 changes: 23 additions & 0 deletions
23
docs/ChatGptNet.Extensions/ChatGptResponseExtensions/AsDeltas.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ChatGptResponseExtensions.AsDeltas method | ||
|
||
Returns an IAsyncEnumerable that allows to enumerate all the partial message deltas. | ||
|
||
```csharp | ||
public static IAsyncEnumerable<string> AsDeltas(this IAsyncEnumerable<ChatGptResponse> responses) | ||
``` | ||
|
||
| parameter | description | | ||
| --- | --- | | ||
| responses | The source IAsyncEnumerable. | | ||
|
||
## Return Value | ||
|
||
An IAsyncEnumerable that allows to enumerate all the partial message deltas. | ||
|
||
## See Also | ||
|
||
* class [ChatGptResponse](../../ChatGptNet.Models/ChatGptResponse.md) | ||
* class [ChatGptResponseExtensions](../ChatGptResponseExtensions.md) | ||
* namespace [ChatGptNet.Extensions](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# ChatGptChoice class | ||
|
||
Represent a chat completion choice. | ||
|
||
```csharp | ||
public class ChatGptChoice | ||
``` | ||
|
||
## Public Members | ||
|
||
| name | description | | ||
| --- | --- | | ||
| [ChatGptChoice](ChatGptChoice/ChatGptChoice.md)() | The default constructor. | | ||
| [Delta](ChatGptChoice/Delta.md) { get; set; } | When using streaming responses, gets or sets the partial message delta associated with this [`ChatGptChoice`](./ChatGptChoice.md). | | ||
| [FinishReason](ChatGptChoice/FinishReason.md) { get; set; } | Gets or sets a value specifying why the choice has been returned. | | ||
| [Index](ChatGptChoice/Index.md) { get; set; } | Gets or sets the index of the choice in the list. | | ||
| [IsFunctionCall](ChatGptChoice/IsFunctionCall.md) { get; } | Gets a value indicating whether this choice contains a function call. | | ||
| [Message](ChatGptChoice/Message.md) { get; set; } | Gets or sets the message associated with this [`ChatGptChoice`](./ChatGptChoice.md). | | ||
|
||
## See Also | ||
|
||
* namespace [ChatGptNet.Models](../ChatGptNet.md) | ||
* [ChatGptChoice.cs](https://github.com/marcominerva/ChatGptNet/tree/master/src/ChatGptNet/Models/ChatGptChoice.cs) | ||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ChatGptChoice constructor | ||
|
||
The default constructor. | ||
|
||
```csharp | ||
public ChatGptChoice() | ||
``` | ||
|
||
## See Also | ||
|
||
* class [ChatGptChoice](../ChatGptChoice.md) | ||
* namespace [ChatGptNet.Models](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# ChatGptChoice.Delta property | ||
|
||
When using streaming responses, gets or sets the partial message delta associated with this [`ChatGptChoice`](../ChatGptChoice.md). | ||
|
||
```csharp | ||
public ChatGptMessage? Delta { get; set; } | ||
``` | ||
|
||
## See Also | ||
|
||
* class [ChatGptMessage](../ChatGptMessage.md) | ||
* class [ChatGptChoice](../ChatGptChoice.md) | ||
* namespace [ChatGptNet.Models](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# ChatGptChoice.FinishReason property | ||
|
||
Gets or sets a value specifying why the choice has been returned. | ||
|
||
```csharp | ||
public string FinishReason { get; set; } | ||
``` | ||
|
||
## Remarks | ||
|
||
Possible values are: | ||
|
||
* stop: API returned complete model output | ||
* length: incomplete model output due to max_tokens parameter or token limit | ||
* function_call: the model decided to call a function | ||
* content_filter: omitted content due to a flag from content filters | ||
* null: API response still in progress or incomplete | ||
|
||
## See Also | ||
|
||
* class [ChatGptChoice](../ChatGptChoice.md) | ||
* namespace [ChatGptNet.Models](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ChatGptChoice.Index property | ||
|
||
Gets or sets the index of the choice in the list. | ||
|
||
```csharp | ||
public int Index { get; set; } | ||
``` | ||
|
||
## See Also | ||
|
||
* class [ChatGptChoice](../ChatGptChoice.md) | ||
* namespace [ChatGptNet.Models](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ChatGptChoice.IsFunctionCall property | ||
|
||
Gets a value indicating whether this choice contains a function call. | ||
|
||
```csharp | ||
public bool IsFunctionCall { get; } | ||
``` | ||
|
||
## See Also | ||
|
||
* class [ChatGptChoice](../ChatGptChoice.md) | ||
* namespace [ChatGptNet.Models](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# ChatGptChoice.Message property | ||
|
||
Gets or sets the message associated with this [`ChatGptChoice`](../ChatGptChoice.md). | ||
|
||
```csharp | ||
public ChatGptMessage Message { get; set; } | ||
``` | ||
|
||
## See Also | ||
|
||
* class [ChatGptMessage](../ChatGptMessage.md) | ||
* class [ChatGptChoice](../ChatGptChoice.md) | ||
* namespace [ChatGptNet.Models](../../ChatGptNet.md) | ||
|
||
<!-- DO NOT EDIT: generated by xmldocmd for ChatGptNet.dll --> |
Oops, something went wrong.