mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-18 12:58:59 +00:00
community[patch]: Fix docstring for ollama parameter "keep_alive" (#23973)
Fix doc-string for ollama integration
This commit is contained in:
parent
0c1889c713
commit
c59e663365
@ -112,18 +112,20 @@ class _OllamaCommon(BaseLanguageModel):
|
||||
"""Timeout for the request stream"""
|
||||
|
||||
keep_alive: Optional[Union[int, str]] = None
|
||||
"""How long the model will stay loaded into memory."""
|
||||
"""How long the model will stay loaded into memory.
|
||||
|
||||
raw: Optional[bool] = None
|
||||
"""raw or not.""
|
||||
The parameter (Default: 5 minutes) can be set to:
|
||||
1. a duration string in Golang (such as "10m" or "24h");
|
||||
2. a number in seconds (such as 3600);
|
||||
3. any negative number which will keep the model loaded \
|
||||
in memory (e.g. -1 or "-1m");
|
||||
4. 0 which will unload the model immediately after generating a response;
|
||||
|
||||
See the [Ollama documents](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-keep-a-model-loaded-in-memory-or-make-it-unload-immediately)"""
|
||||
|
||||
raw: Optional[bool] = None
|
||||
"""raw or not."""
|
||||
|
||||
headers: Optional[dict] = None
|
||||
"""Additional headers to pass to endpoint (e.g. Authorization, Referer).
|
||||
This is useful when Ollama is hosted on cloud services that require
|
||||
|
Loading…
Reference in New Issue
Block a user