firqaaa commited on
Commit
2c0c794
1 Parent(s): 63188c8

Update summ.py

Browse files
Files changed (1) hide show
  1. summ.py +3 -3
summ.py CHANGED
@@ -9,7 +9,7 @@ from langchain.chains.combine_documents.stuff import StuffDocumentsChain
9
 
10
  os.environ['OPENAI_API_KEY'] = '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'
11
 
12
- llm = ChatOpenAI(temperature=0, model_name="gpt-3.5-turbo-16k")
13
 
14
  def get_summ(path):
15
 
@@ -45,7 +45,7 @@ def get_summ(path):
45
  # If documents exceed context for `StuffDocumentsChain`
46
  collapse_documents_chain=combine_documents_chain,
47
  # The maximum number of tokens to group documents into.
48
- token_max=12000,
49
  )
50
 
51
  # Combining documents by mapping a chain over them, then combining results
@@ -61,7 +61,7 @@ def get_summ(path):
61
  )
62
 
63
  text_splitter = CharacterTextSplitter.from_tiktoken_encoder(
64
- chunk_size=12000, chunk_overlap=0
65
  )
66
  split_docs = text_splitter.split_documents(docs)
67
 
 
9
 
10
  os.environ['OPENAI_API_KEY'] = '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'
11
 
12
+ llm = ChatOpenAI(temperature=0, model_name="gpt-4-1106-preview")
13
 
14
  def get_summ(path):
15
 
 
45
  # If documents exceed context for `StuffDocumentsChain`
46
  collapse_documents_chain=combine_documents_chain,
47
  # The maximum number of tokens to group documents into.
48
+ token_max=64000,
49
  )
50
 
51
  # Combining documents by mapping a chain over them, then combining results
 
61
  )
62
 
63
  text_splitter = CharacterTextSplitter.from_tiktoken_encoder(
64
+ chunk_size=64000, chunk_overlap=0
65
  )
66
  split_docs = text_splitter.split_documents(docs)
67