OllamaChatClient.IChatClient.GetService(Type, Object) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asks the IChatClient for an object of the specified type serviceType
.
virtual System::Object ^ Microsoft.Extensions.AI.IChatClient.GetService(Type ^ serviceType, System::Object ^ serviceKey) = Microsoft::Extensions::AI::IChatClient::GetService;
C#
object? IChatClient.GetService(Type serviceType, object? serviceKey);
abstract member Microsoft.Extensions.AI.IChatClient.GetService : Type * obj -> obj
override this.Microsoft.Extensions.AI.IChatClient.GetService : Type * obj -> obj
Function GetService (serviceType As Type, serviceKey As Object) As Object Implements IChatClient.GetService
- serviceType
- Type
The type of object being requested.
- serviceKey
- Object
An optional key that can be used to help identify the target service.
The found object, otherwise null
.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided) |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided) |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: