Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,14 +54,14 @@ from langchain.chains import RetrievalQAWithSourcesChain
|
|
54 |
|
55 |
chain_type_kwargs = {"prompt": prompt}
|
56 |
|
57 |
-
llm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0) # Modify model_name if you have access to GPT-4
|
58 |
-
|
59 |
chain = RetrievalQAWithSourcesChain.from_chain_type(
|
60 |
llm=llm,
|
61 |
chain_type="stuff",
|
62 |
-
retriever
|
63 |
return_source_documents=True,
|
64 |
-
chain_type_kwargs=chain_type_kwargs
|
|
|
|
|
65 |
)
|
66 |
|
67 |
query = "ํ๋ณตํ ์ธ์์ด๋?"
|
|
|
54 |
|
55 |
chain_type_kwargs = {"prompt": prompt}
|
56 |
|
|
|
|
|
57 |
chain = RetrievalQAWithSourcesChain.from_chain_type(
|
58 |
llm=llm,
|
59 |
chain_type="stuff",
|
60 |
+
retriever=retriever,
|
61 |
return_source_documents=True,
|
62 |
+
chain_type_kwargs=chain_type_kwargs,
|
63 |
+
reduce_k_below_max_tokens=True,
|
64 |
+
verbose=True,
|
65 |
)
|
66 |
|
67 |
query = "ํ๋ณตํ ์ธ์์ด๋?"
|