Skip to content

Commit

Permalink
Update M.E.AI to 9.0.1-preview.1.24570.5
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Nov 22, 2024
1 parent 5689e3b commit c1ac6f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/Mscc.GenerativeAI.Microsoft/GeminiChatClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ public GeminiChatClient(string apiKey, string model = "")
public ChatClientMetadata Metadata { get; }

/// <inheritdoc/>
public TService? GetService<TService>(object? key)
where TService : class
=> key is null ? this as TService : null;
public object? GetService(Type serviceType, object? key) =>
key is null && serviceType?.IsInstanceOfType(this) is true ? this : null;

/// <inheritdoc/>
public async Task<ChatCompletion> CompleteAsync(IList<ChatMessage> chatMessages,
Expand Down
5 changes: 2 additions & 3 deletions src/Mscc.GenerativeAI.Microsoft/GeminiEmbeddingGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ public GeminiEmbeddingGenerator(string apiKey, string model = "")
public EmbeddingGeneratorMetadata Metadata { get; }

/// <inheritdoc/>
public TService? GetService<TService>(object? key)
where TService : class
=> key is null ? this as TService : null;
public object? GetService(Type serviceType, object? key) =>
key is null && serviceType?.IsInstanceOfType(this) is true ? this : null;

/// <inheritdoc/>
public async Task<GeneratedEmbeddings<Embedding<float>>> GenerateAsync(IEnumerable<string> values,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI" Version="9.0.0-preview.9.24525.1" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.0.1-preview.1.24570.5" />
<PackageReference Include="Mscc.GenerativeAI" Version="1.8.3" />
</ItemGroup>

Expand Down

0 comments on commit c1ac6f3

Please sign in to comment.