mirror of
https://github.com/ParisNeo/lollms.git
synced 2024-12-22 14:02:27 +00:00
added ollama vectorization
This commit is contained in:
parent
b515a38645
commit
1e10efabc5
@ -783,9 +783,9 @@ class Discussion:
|
|||||||
elif self.lollms.config.rag_vectorizer=="openai":
|
elif self.lollms.config.rag_vectorizer=="openai":
|
||||||
from lollmsvectordb.lollms_vectorizers.openai_vectorizer import OpenAIVectorizer
|
from lollmsvectordb.lollms_vectorizers.openai_vectorizer import OpenAIVectorizer
|
||||||
vectorizer = OpenAIVectorizer(self.lollms.config.rag_vectorizer_model, self.lollms.config.rag_vectorizer_openai_key)
|
vectorizer = OpenAIVectorizer(self.lollms.config.rag_vectorizer_model, self.lollms.config.rag_vectorizer_openai_key)
|
||||||
elif self.config.rag_vectorizer == "ollama":
|
elif self.lollms.config.rag_vectorizer == "ollama":
|
||||||
from lollmsvectordb.lollms_vectorizers.ollama_vectorizer import OllamaVectorizer
|
from lollmsvectordb.lollms_vectorizers.ollama_vectorizer import OllamaVectorizer
|
||||||
v = OllamaVectorizer(self.lollms.config.rag_vectorizer_model, self.lollms.config.rag_service_url)
|
vectorizer = OllamaVectorizer(self.lollms.config.rag_vectorizer_model, self.lollms.config.rag_service_url)
|
||||||
|
|
||||||
self.vectorizer = VectorDatabase(
|
self.vectorizer = VectorDatabase(
|
||||||
self.discussion_rag_folder/"db.sqli",
|
self.discussion_rag_folder/"db.sqli",
|
||||||
@ -957,6 +957,10 @@ class Discussion:
|
|||||||
elif self.lollms.config.rag_vectorizer == "openai":
|
elif self.lollms.config.rag_vectorizer == "openai":
|
||||||
from lollmsvectordb.lollms_vectorizers.openai_vectorizer import OpenAIVectorizer
|
from lollmsvectordb.lollms_vectorizers.openai_vectorizer import OpenAIVectorizer
|
||||||
v = OpenAIVectorizer(self.lollms.config.rag_vectorizer_openai_key)
|
v = OpenAIVectorizer(self.lollms.config.rag_vectorizer_openai_key)
|
||||||
|
elif self.lollms.config.rag_vectorizer == "ollama":
|
||||||
|
from lollmsvectordb.lollms_vectorizers.ollama_vectorizer import OllamaVectorizer
|
||||||
|
v = OllamaVectorizer(self.lollms.config.rag_vectorizer_model, self.lollms.config.rag_service_url)
|
||||||
|
|
||||||
self.vectorizer = VectorDatabase(
|
self.vectorizer = VectorDatabase(
|
||||||
self.discussion_rag_folder/"db.sqli",
|
self.discussion_rag_folder/"db.sqli",
|
||||||
v,
|
v,
|
||||||
|
Loading…
Reference in New Issue
Block a user