Azure-Samples / Azure-Samples/rag-data-openai-python-promptflow
build_index.py: index_name hardcoded in python file, .env AZUREAI_SEARCH_INDEX_NAME is ignored
- 主要语言
- Python
- 星标
- 290
- 派生
- 152
- PR 合并指标
- 30 天内没有已合并 PR
描述
> Please provide us with the following information:
> ---------------------------------------------------------------
### This issue is for a: (mark with an `x`)
```
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
```
### Minimal steps to reproduce
> in build_index.py the index name is hardcoded to "tutorial-index". However the index can also be specified via the .env file.
IMO the .env file should be read and only if there is no value, we should set a default value (to e.g. "tutorial-index)
hard coded value: https://github.com/Azure-Samples/rag-data-openai-python-promptflow/blob/7e8e6b04727364b2a608fd62b2efa1ffa322d266/tutorial/build_index.py#L44
env specified value: https://github.com/Azure-Samples/rag-data-openai-python-promptflow/blob/7e8e6b04727364b2a608fd62b2efa1ffa322d266/tutorial/sample.env#L12
### Any log messages given by the failure
>
### Expected/desired behavior
> index name should be read from value specified in the .env file
### OS and Version?
> Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
### Versions
>
### Mention any other details that might be useful
> ---------------------------------------------------------------
> Thanks! We'll be in touch soon.
贡献指南
这个仓库没有索引到贡献指南
调研方向
从 tutorial/build_index.py 中硬编码的索引名称开始,并将其与 tutorial/sample.env 中的 AZUREAI_SEARCH_INDEX_NAME 条目进行比较。跟踪环境配置的加载方式,然后验证使用的是已配置的名称,并且在未提供任何值时,现有默认值仍然有效。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, python
- 领域
- search
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 48/100