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
- Vorherrschende Sprache
- Python
- Sterne
- 290
- Forks
- 152
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
> 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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne in tutorial/build_index.py beim fest codierten Indexnamen und vergleiche ihn mit dem Eintrag AZUREAI_SEARCH_INDEX_NAME in tutorial/sample.env. Verfolge, wie die Umgebungskonfiguration geladen wird, und überprüfe anschließend, dass der konfigurierte Name verwendet wird und der vorhandene Standardwert weiterhin wirksam ist, wenn kein Wert angegeben wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- azure, python
- Bereich
- search
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 48/100