robertselvam commited on
Commit
def65f1
·
verified ·
1 Parent(s): 5f8a5b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -83,11 +83,12 @@ class ChatDocumentQA:
83
  Returns:
84
  List[str]: List of smaller text chunks.
85
  """
86
- text_splitter = CharacterTextSplitter(separator="\n", chunk_size=500, chunk_overlap=100, length_function=len)
87
 
88
  chunks = text_splitter.split_documents(text)
89
 
90
  return chunks
 
91
  def _create_vector_store_from_text_chunks(self, text_chunks: List[str]) -> FAISS:
92
  """Create a vector store from text chunks.
93
 
@@ -211,7 +212,7 @@ class ChatDocumentQA:
211
 
212
  def create_agent_chain_for_csv_qa(self,memory,tools,prompt):
213
 
214
- llm_chain = LLMChain(llm=AzureChatOpenAI(azure_deployment = "ChatGPT"), prompt=prompt)
215
  agent = ZeroShotAgent(llm_chain=llm_chain, tools=tools, verbose=True)
216
  agent_chain = AgentExecutor.from_agent_and_tools(
217
  agent=agent, tools=tools, verbose=True, memory=memory
 
83
  Returns:
84
  List[str]: List of smaller text chunks.
85
  """
86
+ text_splitter = CharacterTextSplitter(separator="\n", chunk_size=6000, chunk_overlap=0, length_function=len)
87
 
88
  chunks = text_splitter.split_documents(text)
89
 
90
  return chunks
91
+
92
  def _create_vector_store_from_text_chunks(self, text_chunks: List[str]) -> FAISS:
93
  """Create a vector store from text chunks.
94
 
 
212
 
213
  def create_agent_chain_for_csv_qa(self,memory,tools,prompt):
214
 
215
+ llm_chain = LLMChain(llm=AzureChatOpenAI(azure_deployment = "GPT-4"), prompt=prompt)
216
  agent = ZeroShotAgent(llm_chain=llm_chain, tools=tools, verbose=True)
217
  agent_chain = AgentExecutor.from_agent_and_tools(
218
  agent=agent, tools=tools, verbose=True, memory=memory