Skip to content

Commit babd9c6

Browse files
committed
Add user:email to GitHub OAuth.
1 parent 281e5a2 commit babd9c6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

src/Infrastructure/BotSharp.OpenAPI/BotSharpOpenApiExtensions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ public static IServiceCollection AddBotSharpOpenAPI(this IServiceCollection serv
9696
options.ClientId = config["OAuth:GitHub:ClientId"];
9797
options.ClientSecret = config["OAuth:GitHub:ClientSecret"];
9898
options.Events.OnTicketReceived = OnTicketReceivedContext;
99+
100+
// Add the scope for user email for GitHub OAuth
101+
// Have to add this scope to get user email when using invite link
102+
options.Scope.Add("user:email");
99103
});
100104
}
101105

src/Plugins/BotSharp.Plugin.OpenAI/BotSharp.Plugin.OpenAI.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="OpenAI" />
15+
<PackageReference Include="Rougamo.Fody" />
1516
</ItemGroup>
1617

1718
<ItemGroup>

src/Plugins/BotSharp.Plugin.OpenAI/Providers/Embedding/TextEmbeddingProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public TextEmbeddingProvider(
2525
_services = services;
2626
}
2727

28+
[SharpCache(60)]
2829
public async Task<float[]> GetVectorAsync(string text)
2930
{
3031
var client = ProviderHelper.GetClient(Provider, _model, _services);

0 commit comments

Comments
 (0)