dify/api/core/rag/test.py

9 lines
244 B
Python
Raw Normal View History

2024-03-04 15:07:56 +08:00
from llama_index.core import DocumentSummaryIndex
doc_summary_index = DocumentSummaryIndex.from_documents(
city_docs,
llm=chatgpt,
transformations=[splitter],
response_synthesizer=response_synthesizer,
show_progress=True,
)