createOllamaProvider function
OllamaProvider
createOllamaProvider({
- String? baseUrl,
- String? apiKey,
- String? model,
- int? maxTokens,
- double? temperature,
- String? systemPrompt,
- Duration? timeout,
- double? topP,
- int? topK,
- List<
Tool> ? tools, - StructuredOutputFormat? jsonSchema,
- int? numCtx,
- int? numGpu,
- int? numThread,
- bool? numa,
- int? numBatch,
- String? keepAlive,
- bool? raw,
Create an Ollama provider with default configuration
Implementation
OllamaProvider createOllamaProvider({
String? baseUrl,
String? apiKey,
String? model,
int? maxTokens,
double? temperature,
String? systemPrompt,
Duration? timeout,
double? topP,
int? topK,
List<Tool>? tools,
StructuredOutputFormat? jsonSchema,
// Ollama-specific parameters
int? numCtx,
int? numGpu,
int? numThread,
bool? numa,
int? numBatch,
String? keepAlive,
bool? raw,
}) {
final config = OllamaConfig(
baseUrl: baseUrl ?? 'http://localhost:11434',
apiKey: apiKey,
model: model ?? 'llama3.2',
maxTokens: maxTokens,
temperature: temperature,
systemPrompt: systemPrompt,
timeout: timeout,
topP: topP,
topK: topK,
tools: tools,
jsonSchema: jsonSchema,
numCtx: numCtx,
numGpu: numGpu,
numThread: numThread,
numa: numa,
numBatch: numBatch,
keepAlive: keepAlive,
raw: raw,
);
return OllamaProvider(config);
}