Update utils.py
Browse files
utils.py
CHANGED
@@ -4,9 +4,11 @@ from langchain.text_splitter import CharacterTextSplitter, RecursiveCharacterTex
|
|
4 |
from langchain_community.vectorstores import Chroma
|
5 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
6 |
from langchain_community.retrievers import BM25Retriever
|
7 |
-
from
|
8 |
from langchain_openai import ChatOpenAI
|
9 |
from langchain.chains import RetrievalQA
|
|
|
|
|
10 |
import os
|
11 |
|
12 |
def split_with_source(text, source):
|
|
|
4 |
from langchain_community.vectorstores import Chroma
|
5 |
from langchain_community.embeddings import HuggingFaceEmbeddings
|
6 |
from langchain_community.retrievers import BM25Retriever
|
7 |
+
from langchain_community.llms import OpenAI
|
8 |
from langchain_openai import ChatOpenAI
|
9 |
from langchain.chains import RetrievalQA
|
10 |
+
from langchain.schema import AIMessage, HumanMessage
|
11 |
+
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
|
12 |
import os
|
13 |
|
14 |
def split_with_source(text, source):
|