跳至内容

查询引擎#

概念#

查询引擎是一个通用接口,允许您对数据提出问题。

查询引擎接收自然语言查询,并返回丰富的响应结果。 它通常(但并非总是)通过检索器基于一个或多个索引构建。 您可以通过组合多个查询引擎来实现更高级的功能。

提示

如果您想与您的数据进行对话(多次来回交流而非单一问答),请查看Chat Engine

使用模式#

开始使用:

query_engine = index.as_query_engine()
response = query_engine.query("Who is Paul Graham.")

要流式传输响应:

query_engine = index.as_query_engine(streaming=True)
streaming_response = query_engine.query("Who is Paul Graham.")
streaming_response.print_response_stream()

查看完整的使用模式获取更多详情。

模块#

模块指南中查找所有模块。

支持模块#

还有支持模块

优云智算