Warn windows users about setx restart terminal

This commit is contained in:
Paul Gauthier 2024-08-13 09:25:01 -07:00
parent 4d9f091802
commit 390e425729
2 changed files with 8 additions and 7 deletions

View file

@ -676,15 +676,12 @@ def sanity_check_model(io, model):
for key in model.missing_keys:
io.tool_error(f"- {key}")
if platform.system() == "Windows":
if platform.system() == "Windows" or True:
io.tool_output(
"\nNote for Windows users: If you've just set these environment variables using"
" 'setx',"
)
io.tool_output(
"you may need to restart your terminal or command prompt for the changes to take"
" effect."
"If you just set these environment variables using `setx` you may need to restart"
" your terminal or command prompt for the changes to take effect."
)
elif not model.keys_in_environment:
show = True
io.tool_output(f"Model {model}: Unknown which environment variables are required.")

View file

@ -44,6 +44,10 @@ Model azure/gpt-4-turbo: Missing these environment variables:
- AZURE_API_KEY
```
{: .tip }
On Windows,
if you just set these environment variables using `setx` you may need to restart your terminal or
command prompt for the changes to take effect.
## Unknown which environment variables are required