refactor: update Ollama components to use langchain-ollama integration (#4369)
* refactor: reorganize langchain dependencies in pyproject.toml * feat: add langchain-ollama dependency to pyproject.toml * fix: update imports to use langchain_ollama for OllamaEmbeddings and ChatOllama
This commit is contained in:
parent
42cc1dacd2
commit
f66139a800
5 changed files with 427 additions and 23 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from langchain_community.embeddings import OllamaEmbeddings
|
||||
from langchain_ollama import OllamaEmbeddings
|
||||
|
||||
from langflow.base.models.model import LCModelComponent
|
||||
from langflow.field_typing import Embeddings
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from typing import Any
|
|||
from urllib.parse import urljoin
|
||||
|
||||
import httpx
|
||||
from langchain_community.chat_models import ChatOllama
|
||||
from langchain_ollama import ChatOllama
|
||||
|
||||
from langflow.base.models.model import LCModelComponent
|
||||
from langflow.field_typing import LanguageModel
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ from unittest.mock import MagicMock, patch
|
|||
from urllib.parse import urljoin
|
||||
|
||||
import pytest
|
||||
from langchain_community.chat_models import ChatOllama
|
||||
from langchain_ollama import ChatOllama
|
||||
from langflow.components.models import ChatOllamaComponent
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue