OllamaKernelBuilderExtensions.AddOllamaTextGeneration Method
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.
Overloads
| AddOllamaTextGeneration(IKernelBuilder, OllamaApiClient, String) |
Add Ollama Text Generation service to the kernel builder. |
| AddOllamaTextGeneration(IKernelBuilder, String, OllamaApiClient, String) |
Add Ollama Text Generation service to the kernel builder. |
| AddOllamaTextGeneration(IKernelBuilder, String, String, HttpClient) |
Add Ollama Text Generation service to the kernel builder. |
| AddOllamaTextGeneration(IKernelBuilder, String, Uri, String) |
Add Ollama Text Generation service to the kernel builder. |
AddOllamaTextGeneration(IKernelBuilder, OllamaApiClient, String)
Add Ollama Text Generation service to the kernel builder.
public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaTextGeneration(this Microsoft.SemanticKernel.IKernelBuilder builder, OllamaSharp.OllamaApiClient? ollamaClient = default, string? serviceId = default);
static member AddOllamaTextGeneration : Microsoft.SemanticKernel.IKernelBuilder * OllamaSharp.OllamaApiClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaTextGeneration (builder As IKernelBuilder, Optional ollamaClient As OllamaApiClient = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The kernel builder.
- ollamaClient
- OllamaSharp.OllamaApiClient
The Ollama Sharp library client.
- serviceId
- String
The optional service ID.
Returns
The updated kernel builder.
Applies to
AddOllamaTextGeneration(IKernelBuilder, String, OllamaApiClient, String)
Add Ollama Text Generation service to the kernel builder.
public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaTextGeneration(this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, OllamaSharp.OllamaApiClient ollamaClient, string? serviceId = default);
static member AddOllamaTextGeneration : Microsoft.SemanticKernel.IKernelBuilder * string * OllamaSharp.OllamaApiClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaTextGeneration (builder As IKernelBuilder, modelId As String, ollamaClient As OllamaApiClient, Optional serviceId As String = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The kernel builder.
- modelId
- String
The model for text generation.
- ollamaClient
- OllamaSharp.OllamaApiClient
The Ollama Sharp library client.
- serviceId
- String
The optional service ID.
Returns
The updated kernel builder.
Applies to
AddOllamaTextGeneration(IKernelBuilder, String, String, HttpClient)
Add Ollama Text Generation service to the kernel builder.
public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaTextGeneration(this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, string? serviceId = default, System.Net.Http.HttpClient? httpClient = default);
static member AddOllamaTextGeneration : Microsoft.SemanticKernel.IKernelBuilder * string * string * System.Net.Http.HttpClient -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaTextGeneration (builder As IKernelBuilder, modelId As String, Optional serviceId As String = Nothing, Optional httpClient As HttpClient = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The kernel builder.
- modelId
- String
The model for text generation.
- serviceId
- String
The optional service ID.
- httpClient
- HttpClient
The optional custom HttpClient.
Returns
The updated kernel builder.
Applies to
AddOllamaTextGeneration(IKernelBuilder, String, Uri, String)
Add Ollama Text Generation service to the kernel builder.
public static Microsoft.SemanticKernel.IKernelBuilder AddOllamaTextGeneration(this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, Uri endpoint, string? serviceId = default);
static member AddOllamaTextGeneration : Microsoft.SemanticKernel.IKernelBuilder * string * Uri * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddOllamaTextGeneration (builder As IKernelBuilder, modelId As String, endpoint As Uri, Optional serviceId As String = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The kernel builder.
- modelId
- String
The model for text generation.
- endpoint
- Uri
The endpoint to Ollama hosted service.
- serviceId
- String
The optional service ID.
Returns
The updated kernel builder.