robertselvam commited on
Commit
26dd1ba
1 Parent(s): 47be40d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -81,7 +81,7 @@ class ChatDocumentQA:
81
  Returns:
82
  List[str]: List of smaller text chunks.
83
  """
84
- text_splitter = CharacterTextSplitter(separator="\n", chunk_size=500, chunk_overlap=100, length_function=len)
85
 
86
  chunks = text_splitter.split_documents(text)
87
 
@@ -112,7 +112,7 @@ class ChatDocumentQA:
112
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
113
 
114
  # llm = ChatOpenAI(temperature=0)
115
- llm=OpenAI(temperature=0)
116
  return ConversationalRetrievalChain.from_llm(llm=llm, retriever=vectorstore.as_retriever(),
117
  condense_question_prompt=CONDENSE_QUESTION_PROMPT,
118
  memory=memory)
 
81
  Returns:
82
  List[str]: List of smaller text chunks.
83
  """
84
+ text_splitter = CharacterTextSplitter(separator="\n", chunk_size=1000, chunk_overlap=100, length_function=len)
85
 
86
  chunks = text_splitter.split_documents(text)
87
 
 
112
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
113
 
114
  # llm = ChatOpenAI(temperature=0)
115
+ llm=OpenAI(temperature=0.1)
116
  return ConversationalRetrievalChain.from_llm(llm=llm, retriever=vectorstore.as_retriever(),
117
  condense_question_prompt=CONDENSE_QUESTION_PROMPT,
118
  memory=memory)