Update app.py
Browse filesTry CohereEmbeddings
app.py
CHANGED
@@ -21,6 +21,7 @@ from langchain import hub
|
|
21 |
from langchain_core.output_parsers import StrOutputParser
|
22 |
from langchain_core.runnables import RunnablePassthrough
|
23 |
from langchain_core.prompts import ChatPromptTemplate
|
|
|
24 |
|
25 |
from typing import List, Tuple, Dict, Any, Optional
|
26 |
|
@@ -105,7 +106,7 @@ def main() -> None:
|
|
105 |
|
106 |
## Mod from nomic-embed-text to nomic-ai/nomic-embed-text-v1.5
|
107 |
#embeddings = OllamaEmbeddings(model='nomic-ai/nomic-embed-text-v1.5', base_url="http://localhost:11434")
|
108 |
-
embeddings =
|
109 |
|
110 |
single_vector = embeddings.embed_query("this is some text data")
|
111 |
|
|
|
21 |
from langchain_core.output_parsers import StrOutputParser
|
22 |
from langchain_core.runnables import RunnablePassthrough
|
23 |
from langchain_core.prompts import ChatPromptTemplate
|
24 |
+
from langchain_cohere import CohereEmbeddings
|
25 |
|
26 |
from typing import List, Tuple, Dict, Any, Optional
|
27 |
|
|
|
106 |
|
107 |
## Mod from nomic-embed-text to nomic-ai/nomic-embed-text-v1.5
|
108 |
#embeddings = OllamaEmbeddings(model='nomic-ai/nomic-embed-text-v1.5', base_url="http://localhost:11434")
|
109 |
+
embeddings = CohereEmbeddings(model="embed-english-v3.0")
|
110 |
|
111 |
single_vector = embeddings.embed_query("this is some text data")
|
112 |
|