Suat ATAN commited on
Commit
dcd0d1a
·
1 Parent(s): 79ff554
core/__pycache__/qa.cpython-310.pyc CHANGED
Binary files a/core/__pycache__/qa.cpython-310.pyc and b/core/__pycache__/qa.cpython-310.pyc differ
 
core/qa.py CHANGED
@@ -3,13 +3,14 @@ from langchain.chains.qa_with_sources import load_qa_with_sources_chain
3
  from core.prompts import STUFF_PROMPT
4
  from langchain.docstore.document import Document
5
  from core.embedding import FolderIndex
6
- from pydantic import BaseModel
7
  from langchain.chat_models.base import BaseChatModel
8
 
9
 
10
- class AnswerWithSources(BaseModel):
11
- answer: str
12
- sources: List[Document]
 
13
 
14
 
15
  def query_folder(
 
3
  from core.prompts import STUFF_PROMPT
4
  from langchain.docstore.document import Document
5
  from core.embedding import FolderIndex
6
+ # from pydantic import BaseModel
7
  from langchain.chat_models.base import BaseChatModel
8
 
9
 
10
+ class AnswerWithSources:
11
+ def __init__(self, answer: str, sources: List[Document]):
12
+ self.answer = answer
13
+ self.sources = sources
14
 
15
 
16
  def query_folder(