Spaces:
Sleeping
Sleeping
singhjagpreet
commited on
Commit
•
452939a
1
Parent(s):
dca98f7
langchain community
Browse files- app.py +3 -3
- src/config.py +1 -1
- src/model.py +1 -1
- src/utils.py +4 -4
app.py
CHANGED
@@ -5,13 +5,13 @@ import logging
|
|
5 |
|
6 |
#export HNSWLIB_NO_NATIVE = 1
|
7 |
|
8 |
-
from
|
9 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
10 |
|
11 |
-
|
12 |
from langchain.memory import ChatMessageHistory, ConversationBufferMemory
|
13 |
from langchain.chains import ConversationalRetrievalChain
|
14 |
-
from
|
15 |
import chainlit as cl
|
16 |
import openai
|
17 |
from src.config import Config
|
|
|
5 |
|
6 |
#export HNSWLIB_NO_NATIVE = 1
|
7 |
|
8 |
+
from langchain_community.document_loaders import PyPDFDirectoryLoader, TextLoader
|
9 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
10 |
|
11 |
+
|
12 |
from langchain.memory import ChatMessageHistory, ConversationBufferMemory
|
13 |
from langchain.chains import ConversationalRetrievalChain
|
14 |
+
from langchain_community.chat_models import ChatOpenAI
|
15 |
import chainlit as cl
|
16 |
import openai
|
17 |
from src.config import Config
|
src/config.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import os
|
2 |
-
from
|
3 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
4 |
from langchain.memory import ChatMessageHistory, ConversationBufferMemory
|
5 |
|
|
|
1 |
import os
|
2 |
+
from langchain_community.embeddings.openai import OpenAIEmbeddings
|
3 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
4 |
from langchain.memory import ChatMessageHistory, ConversationBufferMemory
|
5 |
|
src/model.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
from langchain.chains.qa_with_sources.retrieval import RetrievalQAWithSourcesChain
|
2 |
-
from
|
3 |
import logging
|
4 |
import os
|
5 |
from langchain.chains import ConversationalRetrievalChain
|
|
|
1 |
from langchain.chains.qa_with_sources.retrieval import RetrievalQAWithSourcesChain
|
2 |
+
from langchain_community.chat_models import ChatOpenAI
|
3 |
import logging
|
4 |
import os
|
5 |
from langchain.chains import ConversationalRetrievalChain
|
src/utils.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
from chainlit.types import AskFileResponse
|
2 |
import click
|
3 |
-
from
|
4 |
-
from
|
5 |
-
from
|
6 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
7 |
-
from
|
8 |
import chainlit as cl
|
9 |
from src.config import Config
|
10 |
|
|
|
1 |
from chainlit.types import AskFileResponse
|
2 |
import click
|
3 |
+
from langchain_community.document_loaders import TextLoader
|
4 |
+
from langchain_community.document_loaders import PyPDFLoader
|
5 |
+
from langchain_community.vectorstores import Chroma
|
6 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
7 |
+
from langchain_community.embeddings.openai import OpenAIEmbeddings
|
8 |
import chainlit as cl
|
9 |
from src.config import Config
|
10 |
|