mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-22 14:49:29 +00:00
Update ollama.py (#12895)
duplicate option removed **Description:** An issue fix, http stop option duplicate removed. **Issue:** the issue #12892 fix **Dependencies:** no **Tag maintainer:** @eyurtsev --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
e89e830c55
commit
339973db47
@ -128,7 +128,8 @@ class _OllamaCommon(BaseLanguageModel):
|
|||||||
stop = self.stop
|
stop = self.stop
|
||||||
elif stop is None:
|
elif stop is None:
|
||||||
stop = []
|
stop = []
|
||||||
params = {**self._default_params, "stop": stop, **kwargs}
|
params = {**self._default_params, **kwargs}
|
||||||
|
params["options"]["stop"] = stop
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
url=f"{self.base_url}/api/generate/",
|
url=f"{self.base_url}/api/generate/",
|
||||||
headers={"Content-Type": "application/json"},
|
headers={"Content-Type": "application/json"},
|
||||||
|
Loading…
Reference in New Issue
Block a user