mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-21 06:14:37 +00:00
partners[ollama]: Support seed parameter for ChatOllama (#24782)
## Description Adds seed parameter to ChatOllama ## Resolves Issues - #24703 ## Dependency Changes None Co-authored-by: Lennart J. Kurzweg (Nx2) <git@nx2.site>
This commit is contained in:
parent
e264ccf484
commit
7da0597ecb
@ -291,6 +291,11 @@ class ChatOllama(BaseChatModel):
|
|||||||
"""The temperature of the model. Increasing the temperature will
|
"""The temperature of the model. Increasing the temperature will
|
||||||
make the model answer more creatively. (Default: 0.8)"""
|
make the model answer more creatively. (Default: 0.8)"""
|
||||||
|
|
||||||
|
seed: Optional[int] = None
|
||||||
|
"""Sets the random number seed to use for generation. Setting this
|
||||||
|
to a specific number will make the model generate the same text for
|
||||||
|
the same prompt."""
|
||||||
|
|
||||||
stop: Optional[List[str]] = None
|
stop: Optional[List[str]] = None
|
||||||
"""Sets the stop tokens to use."""
|
"""Sets the stop tokens to use."""
|
||||||
|
|
||||||
@ -335,6 +340,7 @@ class ChatOllama(BaseChatModel):
|
|||||||
"repeat_last_n": self.repeat_last_n,
|
"repeat_last_n": self.repeat_last_n,
|
||||||
"repeat_penalty": self.repeat_penalty,
|
"repeat_penalty": self.repeat_penalty,
|
||||||
"temperature": self.temperature,
|
"temperature": self.temperature,
|
||||||
|
"seed": self.seed,
|
||||||
"stop": self.stop,
|
"stop": self.stop,
|
||||||
"tfs_z": self.tfs_z,
|
"tfs_z": self.tfs_z,
|
||||||
"top_k": self.top_k,
|
"top_k": self.top_k,
|
||||||
|
Loading…
Reference in New Issue
Block a user