-
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.
Add support for stream_options (#161)
- Loading branch information
Showing
17 changed files
with
95 additions
and
71 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
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
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
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 |
---|---|---|
@@ -1,35 +1,35 @@ | ||
{ | ||
"ChatGPT": { | ||
"Provider": "OpenAI", // Optional. Allowed values: OpenAI (default) or Azure | ||
"ApiKey": "", // Required | ||
//"Organization": "", // Optional, used only by OpenAI | ||
"ResourceName": "", // Required when using Azure OpenAI Service | ||
"ApiVersion": "2024-06-01", // Optional, used only by Azure OpenAI Service (default: 2024-06-01) | ||
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory | ||
|
||
"DefaultModel": "my-model", | ||
"DefaultEmbeddingModel": "text-embedding-ada-002", // Optional, set it if you want to use embeddings | ||
"MessageLimit": 20, | ||
"MessageExpiration": "00:30:00", | ||
"ThrowExceptionOnError": true // Optional, default: true | ||
//"User": "UserName", | ||
//"DefaultParameters": { | ||
// "Temperature": 0.8, | ||
// "TopP": 1, | ||
// "MaxTokens": 500, | ||
// "PresencePenalty": 0, | ||
// "FrequencyPenalty": 0, | ||
// "ResponseFormat": { "Type": "text" }, // Allowed values for Type: text (default) or json_object | ||
// "Seed": 42 // Optional (any integer value) | ||
//}, | ||
//"DefaultEmbeddingParameters": { | ||
// "Dimensions": 1536 | ||
//} | ||
}, | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Error", | ||
"Microsoft": "Warning" | ||
} | ||
} | ||
} | ||
{ | ||
"ChatGPT": { | ||
"Provider": "OpenAI", // Optional. Allowed values: OpenAI (default) or Azure | ||
"ApiKey": "", // Required | ||
//"Organization": "", // Optional, used only by OpenAI | ||
"ResourceName": "", // Required when using Azure OpenAI Service | ||
"ApiVersion": "2024-07-01-preview", // Optional, used only by Azure OpenAI Service (default: 2024-07-01-preview) | ||
"AuthenticationType": "ApiKey", // Optional, used only by Azure OpenAI Service. Allowed values: ApiKey (default) or ActiveDirectory | ||
|
||
"DefaultModel": "my-model", | ||
"DefaultEmbeddingModel": "text-embedding-ada-002", // Optional, set it if you want to use embeddings | ||
"MessageLimit": 20, | ||
"MessageExpiration": "00:30:00", | ||
"ThrowExceptionOnError": true // Optional, default: true | ||
//"User": "UserName", | ||
//"DefaultParameters": { | ||
// "Temperature": 0.8, | ||
// "TopP": 1, | ||
// "MaxTokens": 500, | ||
// "PresencePenalty": 0, | ||
// "FrequencyPenalty": 0, | ||
// "ResponseFormat": { "Type": "text" }, // Allowed values for Type: text (default) or json_object | ||
// "Seed": 42 // Optional (any integer value) | ||
//}, | ||
//"DefaultEmbeddingParameters": { | ||
// "Dimensions": 1536 | ||
//} | ||
}, | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Error", | ||
"Microsoft": "Warning" | ||
} | ||
} | ||
} |
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,9 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace ChatGptNet.Models; | ||
|
||
internal class ChatGptStreamOptions | ||
{ | ||
[JsonPropertyName("include_usage")] | ||
public bool IncludeUsage { get; set; } = true; | ||
} |
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
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