ChatOllama constructor
ChatOllama({})
Create a new ChatOllama instance.
Main configuration options:
baseUrl
: the base URL of Ollama API.ChatOllama.defaultOptions
Advance configuration options:
headers
: global headers to send with every request. You can use this to set custom headers, or to override the default headers.queryParams
: global query parameters to send with every request. You can use this to set custom query parameters.client
: the HTTP client to use. You can set your own HTTP client if you need further customization (e.g. to use a Socks5 proxy).- ChatOllama.encoding
Implementation
ChatOllama({
final String baseUrl = 'http://localhost:11434/api',
final Map<String, String>? headers,
final Map<String, dynamic>? queryParams,
final http.Client? client,
super.defaultOptions = const ChatOllamaOptions(
model: defaultModel,
),
this.encoding = 'cl100k_base',
}) : _client = OllamaClient(
baseUrl: baseUrl,
headers: headers,
queryParams: queryParams,
client: client,
);