-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce preliminary support for GPT-4 Turbo
A new model Gpt4Turbo has been introduced in the ChatCompletionModels class with a tokens limit set to 4096. Corresponding updates have been made to the integration test cases replacing the previous model with this new one. Furthermore, the project version has been updated to 2.9.2 in the Directory.Build.props file
- Loading branch information
Showing
3 changed files
with
15 additions
and
6 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 |
---|---|---|
|
@@ -12,7 +12,7 @@ public async void Get_simple_structured_response_from_ChatGPT() | |
var message = | ||
Dialog.StartAsSystem("What did user input?") | ||
.ThenUser("My name is John, my age is 30, my email is [email protected]"); | ||
var response = await _client.GetStructuredResponse<UserInfo>(message); | ||
var response = await _client.GetStructuredResponse<UserInfo>(message, model: ChatCompletionModels.Gpt4Turbo); | ||
response.Should().NotBeNull(); | ||
response.Name.Should().Be("John"); | ||
response.Age.Should().Be(30); | ||
|
@@ -26,7 +26,7 @@ public async void Get_structured_response_with_ARRAY_from_ChatGPT() | |
.StartAsSystem("What did user input?") | ||
.ThenUser("My name is John, my age is 30, my email is [email protected]. " + | ||
"I want to buy 2 apple and 3 orange."); | ||
var response = await _client.GetStructuredResponse<Order>(message); | ||
var response = await _client.GetStructuredResponse<Order>(message, model: ChatCompletionModels.Gpt4Turbo); | ||
response.Should().NotBeNull(); | ||
response.UserInfo.Should().NotBeNull(); | ||
response.UserInfo!.Name.Should().Be("John"); | ||
|
@@ -46,7 +46,7 @@ public async void Get_structured_response_with_ENUM_from_ChatGPT() | |
var message = Dialog | ||
.StartAsSystem("What did user input?") | ||
.ThenUser("Мой любимый цвет - красный"); | ||
var response = await _client.GetStructuredResponse<Thing>(message); | ||
var response = await _client.GetStructuredResponse<Thing>(message, model: ChatCompletionModels.Gpt4Turbo); | ||
response.Should().NotBeNull(); | ||
response.Color.Should().Be(Thing.Colors.Red); | ||
} | ||
|
@@ -57,7 +57,7 @@ public async void Get_structured_response_with_extra_data_from_ChatGPT() | |
var message = Dialog | ||
.StartAsSystem("Return requested data.") | ||
.ThenUser("I need info about Almaty city"); | ||
var response = await _client.GetStructuredResponse<City>(message); | ||
var response = await _client.GetStructuredResponse<City>(message, model: ChatCompletionModels.Gpt4Turbo); | ||
response.Should().NotBeNull(); | ||
response.Name.Should().Be("Almaty"); | ||
response.Country.Should().Be("Kazakhstan"); | ||
|