refactor: summarize_docs
Browse files
app.py
CHANGED
@@ -32,9 +32,6 @@ def split_documents(docs, length_function, chunk_size=400):
|
|
32 |
|
33 |
|
34 |
def summarize_docs(llm, docs):
|
35 |
-
llm = OpenAI(
|
36 |
-
temperature=temperature, openai_api_key=openai_api_key, model_name=model_name
|
37 |
-
)
|
38 |
chain = load_summarize_chain(llm, chain_type="map_reduce")
|
39 |
return chain.run(docs)
|
40 |
|
|
|
32 |
|
33 |
|
34 |
def summarize_docs(llm, docs):
|
|
|
|
|
|
|
35 |
chain = load_summarize_chain(llm, chain_type="map_reduce")
|
36 |
return chain.run(docs)
|
37 |
|