提示流索引构建
项目描述
Prompflow-rag
Prompflow-rag软件包是Promptflow sdk的一部分,包含本地构建索引的功能
入门指南
先决条件
- 使用此软件包需要Python 3.7或更高版本。
- 您必须拥有Azure订阅。
- 一个Azure机器学习工作区。
- 一个Azure AI Studio项目。
安装软件包
使用pip安装Python的Azure AI生成软件包
pip install prompflow-rag
使用方法
本地创建索引
用户可以使用build_index
方法从本地源文件在本地计算机上创建索引。以下是一个示例。
from promptflow.rag.resources import LocalSource, AzureAISearchConfig, EmbeddingsModelConfig
from promptflow.rag import build_index
# build the index
ai_search_index_path=build_index(
name=index_name, # name of your index
vector_store="azure_ai_search", # the type of vector store - in this case it is Azure AI Search.
embeddings_model_config=EmbeddingsModelConfig(
embeddings_model=f"azure_open_ai://deployment/{embedding_model_deployment}/model/{embedding_model_name}"
)
input_source=LocalSource(input_data="data/product-info/"), # the location of your file/folders
index_config=AzureAISearchConfig(
ai_search_index_name=ai_search_index_name # the name of the index store inside the azure ai search service
)
)
创建索引将返回索引创建的路径。
示例
TODO:添加示例笔记本链接
promptflow-rag软件包
请将变更日志插入“下一个版本”中。
下一个版本
0.1.0
- ConnectionConfig参数重命名
0.0.1
- 引入软件包
项目详情
下载文件
下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装软件包的更多信息。
源分发
本发行版没有提供源代码分发文件。请参阅关于生成分发存档的教程。
构建的分发
promptflow_rag-0.1.0-py3-none-any.whl (13.4 kB 查看哈希值)