OllamaTextGenerationService Class
Definition
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.
Represents a text generation service using Ollama Original API.
public sealed class OllamaTextGenerationService : Microsoft.SemanticKernel.Connectors.Ollama.Core.ServiceBase, Microsoft.SemanticKernel.TextGeneration.ITextGenerationService
type OllamaTextGenerationService = class
inherit ServiceBase
interface ITextGenerationService
interface IAIService
Public NotInheritable Class OllamaTextGenerationService
Inherits ServiceBase
Implements ITextGenerationService
- Inheritance
- Implements
Constructors
| OllamaTextGenerationService(OllamaApiClient, ILoggerFactory) |
Initializes a new instance of the OllamaTextGenerationService class. |
| OllamaTextGenerationService(String, HttpClient, ILoggerFactory) |
Initializes a new instance of the OllamaTextGenerationService class. |
| OllamaTextGenerationService(String, OllamaApiClient, ILoggerFactory) |
Initializes a new instance of the OllamaTextGenerationService class. |
| OllamaTextGenerationService(String, Uri, ILoggerFactory) |
Initializes a new instance of the OllamaTextGenerationService class. |
Properties
| Attributes |
Gets the AI service attributes. |
Methods
| GetStreamingTextContentsAsync(String, PromptExecutionSettings, Kernel, CancellationToken) |
Get streaming results for the prompt using the specified execution settings. Each modality may support for different types of streaming contents. |
| GetTextContentsAsync(String, PromptExecutionSettings, Kernel, CancellationToken) |
Get completion results for the prompt and settings. |
Extension Methods
| GetApiVersion(IAIService) |
Gets the API version from |
| GetEndpoint(IAIService) |
Gets the endpoint from |
| GetModelId(IAIService) |
Gets the model identifier from |
| GetTextContentAsync(ITextGenerationService, String, PromptExecutionSettings, Kernel, CancellationToken) |
Get a single text generation result for the prompt and settings. |