Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VSCode extension setttings are not read correctly #49

Open
Godfather95 opened this issue Jul 24, 2024 · 12 comments
Open

VSCode extension setttings are not read correctly #49

Godfather95 opened this issue Jul 24, 2024 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@Godfather95
Copy link

I am using the following configuration in settings.json:

{
      "name": "default",
      "type": "azure_openai",
      "azure_deployment": "gpt-35-turbo",
      "api_version": "2023-12-01-preview",
      "azure_endpoint": "${env:AZURE_OPENAI_ENDPOINT}",
      "api_key": "${env:AZURE_OPENAI_API_KEY}"
},
{
      "name": "gpt-3.5-turbo",
      "type": "openai",
      "api_key": "${env:OPENAI_API_KEY}",
      "organization": "${env:OPENAI_ORG_ID}",
      "base_url": "${env:OPENAI_BASE_URL}"
}

When running a .prompty file, I get the following info message in the Prompty Output:

info] Missing prompty configuration setting: MissingDeployment. Your setting is {"name":"default","type":"azure_openai","api_version":"2023-12-01-preview","azure_endpoint":"https://<EndpointName>.openai.azure.com/","api_key":"<APIKEY>"}

It seems the Extension doesn't even read the "azure_deployment" from the settings.

@sethjuarez
Copy link
Member

Uh oh - there is a way to select the settings you want at the bottom:
image
Have you tried switching these? FWIW, we will be adding defaults in a more prominent place soon.

@Godfather95
Copy link
Author

@sethjuarez Yeah, I tried it, and I even copied the settings to be the "non default". But no matter which model configuration I select, I always get the error.

@anuraj
Copy link

anuraj commented Jul 27, 2024

For me as well. I tried changing the configuration, but always getting the error.
image

@abakumovoleg
Copy link

the same problem, it always use type azure_openai even if I set openai instead

@perkops
Copy link

perkops commented Aug 4, 2024

I am experiencing the same issue (even with hardcoded values, not being read from environment).

@sethjuarez
Copy link
Member

oof - ok - I will look into it - I am adding some features to the extension this week/next. There's a couple of invokers I need to add to make this work

@sethjuarez sethjuarez self-assigned this Aug 5, 2024
@sethjuarez sethjuarez added the bug Something isn't working label Aug 5, 2024
@AnaTipps
Copy link

AnaTipps commented Aug 6, 2024

I am getting something related, I changed the user settings to add my deployment and after that I start getting this error image
I reverted the changed, uninstall and install again my extension and nothing have worked so far.
I am using the API Key Endpoint pair in my .env file

@AnaTipps
Copy link

AnaTipps commented Aug 6, 2024

I am getting something related, I changed the user settings to add my deployment and after that I start getting this error image
I reverted the changed, uninstall and install again my extension and nothing have worked so far.
I am using the API Key Endpoint pair in my .env file

It seems the problem has been resolved. I traced back the changes made and reverted them. The issue appeared to be related to the workspace settings. Once I deleted the .vscode folder that generates when you open the workspace settings file, the problem was resolved.

@BartNetJS
Copy link

Same issue here

@wayliums
Copy link
Member

We read the setting from prompty.currentModelConfiguration.

In some cases VSCode saves to .vscode/settings.json.
image

And some cases it's saved to your user levels settings.
image

@BartNetJS @AnaTipps @perkops @abakumovoleg @anuraj @Godfather95 , can you let me know what's your case? I'll see how to make this less problematic

@MikeYeager
Copy link

In my case, aside from multiple configuration files, the endpoint was overridden in the yaml file itself. I copied it from a sample and didn't notice the setting and didn't remove it and it overrode my settings files. A strategy I've used in the past is to have a way to retrieve all of the current settings to see if they're what is expected. If a value isn't what you expect, it's just a matter of tracking down the source of the unexpected value. Also, a document explaining all the possible places values can be read from and in what precedence order is also useful.

@MikeStall
Copy link

Same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants