azure-search-openai-demo
azure-search-openai-demo copied to clipboard
FIX: Prompt override error in the Front end
Purpose
Currently, if you try to use the "Prompt Override" in Developer Tools, you will get a Python error coming back in the Chat response. This is because in chatreadretrieveread.py the injected_prompt is not being populated in the prompt_override.format call (as it is in the other cases of the if statement). In this case, injected_prompt is irrelevant, so I have set it to "" as per the un-overriden case.
Does this introduce a breaking change?
[ ] Yes
[x] No
Pull Request Type
What kind of change does this Pull Request introduce?
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:
How to Test
- Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
- Open Developer Tools and enter something into the "Override prompt template".
- Ask a question.
- Response should return without an error.
What to Check
- Response should return without an error.
Other Information
n/a