-
-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from betalgo/dev
Dev
- Loading branch information
Showing
21 changed files
with
313 additions
and
56 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 |
---|---|---|
@@ -1,2 +1,100 @@ | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} | ||
{"prompt":"Overjoyed with the new iPhone! ->", "completion":" positive"} | ||
{"prompt":"@lakers disappoint for a third straight night https://t.co/38EFe43 ->", "completion":" negative"} |
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
26 changes: 26 additions & 0 deletions
26
OpenAI.SDK/Extensions/OpenAIServiceCollectionExtensions.cs
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,26 @@ | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using OpenAI.GPT3.Interfaces; | ||
using OpenAI.GPT3.Managers; | ||
|
||
namespace OpenAI.GPT3.Extensions | ||
{ | ||
public static class OpenAIServiceCollectionExtensions | ||
{ | ||
public static IServiceCollection AddOpenAIService(this IServiceCollection services) | ||
{ | ||
services.AddOptions<OpenAiOptions>(); | ||
services.AddHttpClient<IOpenAIService, OpenAIService>(); | ||
var configuration = services.BuildServiceProvider().GetRequiredService<IConfiguration>(); | ||
services.Configure<OpenAiOptions>(configuration.GetSection(OpenAiOptions.SettingKey)); | ||
return services; | ||
} | ||
|
||
public static IServiceCollection AddOpenAIService(this IServiceCollection services, Action<OpenAiOptions> setupAction) | ||
{ | ||
services.AddOptions<OpenAiOptions>().Configure(setupAction); | ||
services.AddHttpClient<IOpenAIService, OpenAIService>(); | ||
return services; | ||
} | ||
} | ||
} |
Oops, something went wrong.