mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-18 09:01:03 +00:00
ollama[patch]: delete suffix slash to avoid redirect (#18260)
- **Description:** see [ollama](https://github.com/ollama/ollama/blob/main/server/routes.go#L949)'s route definitions - **Issue:** N/A - **Dependencies:** N/A
This commit is contained in:
parent
6b58943917
commit
2c42f3a955
@ -159,7 +159,7 @@ class ChatOllama(BaseChatModel, _OllamaCommon):
|
|||||||
"messages": self._convert_messages_to_ollama_messages(messages),
|
"messages": self._convert_messages_to_ollama_messages(messages),
|
||||||
}
|
}
|
||||||
yield from self._create_stream(
|
yield from self._create_stream(
|
||||||
payload=payload, stop=stop, api_url=f"{self.base_url}/api/chat/", **kwargs
|
payload=payload, stop=stop, api_url=f"{self.base_url}/api/chat", **kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
async def _acreate_chat_stream(
|
async def _acreate_chat_stream(
|
||||||
@ -172,7 +172,7 @@ class ChatOllama(BaseChatModel, _OllamaCommon):
|
|||||||
"messages": self._convert_messages_to_ollama_messages(messages),
|
"messages": self._convert_messages_to_ollama_messages(messages),
|
||||||
}
|
}
|
||||||
async for stream_resp in self._acreate_stream(
|
async for stream_resp in self._acreate_stream(
|
||||||
payload=payload, stop=stop, api_url=f"{self.base_url}/api/chat/", **kwargs
|
payload=payload, stop=stop, api_url=f"{self.base_url}/api/chat", **kwargs
|
||||||
):
|
):
|
||||||
yield stream_resp
|
yield stream_resp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user