Skip to content

Commit

Permalink
Update M.E.AI version
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub committed Nov 22, 2024
1 parent c259c62 commit 69a2b69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/csharp/ChatClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,12 @@ public async IAsyncEnumerable<StreamingChatCompletionUpdate> CompleteStreamingAs
}

/// <inheritdoc/>
public TService GetService<TService>(object key = null) where TService : class =>
typeof(TService) == typeof(Model) ? (TService)(object)_model :
typeof(TService) == typeof(Tokenizer) ? (TService)(object)_tokenizer :
this as TService;
public object GetService(Type serviceType, object key = null) =>
key is not null ? null :
serviceType == typeof(Model) ? _model :
serviceType == typeof(Tokenizer) ? _tokenizer :
serviceType?.IsInstanceOfType(this) is true ? this :
null;

/// <summary>Gets whether the specified token is a stop sequence.</summary>
private bool IsStop(string token, ChatOptions options) =>
Expand Down
2 changes: 1 addition & 1 deletion src/csharp/Microsoft.ML.OnnxRuntimeGenAI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</ItemGroup>

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

</Project>

0 comments on commit 69a2b69

Please sign in to comment.