microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.01k stars 8.22k forks source link

Attempt to configure "Terminal Chat" on second machine results in invalid Azure OpenAI endpoint error. #16442

Open akulbe opened 9 months ago

akulbe commented 9 months ago

Windows Terminal version

1.20.3401.0

Windows build number

22635.2841

Other Software

No response

Steps to reproduce

  1. I have "Terminal Chat" successfully configured on one machine already.
  2. Open up Terminal, go to Settings > Terminal Chat, add the endpoint URL and Key 2.
  3. Save Settings and close Terminal.
  4. Reopen Terminal and go to Terminal Chat.
  5. Attempt to enter prompt.
  6. Be greeted with a message saying the endpoint I provided is not a valid Azure OpenAI endpoint.

image image

Expected Behavior

image

I was expecting similar results as this screenshot shows, where the Terminal is actually connecting to, and interacting with, the LLM.

Actual Behavior

Received the "Not a valid endpoint" error message

g0t4 commented 3 months ago

I can't configure Terminal Chat to work either, I get a different warning Resource not found and I have verified the endpoint works when I make a curl call... one concern I have is, what is the deployment name supposed to be? The docs don't list a name to use and forming an API request requires a deployment name (unless it does some model lookup and uses first matching model?)... the docs show TerminalSuggestions model deployment name but that doesn't work either. I am using canary 1.22.1661.0

g0t4 commented 3 months ago

@akulbe FYI my Azure OpenAI service endpoint now uses .openai.azure.com and not .cognitiveservices.azure.com so maybe check your Azure portal for a new endpoint?

PankajBhojwani commented 3 months ago

Make sure you are using the correct endpoint! The one in your screenshot is not the endpoint for your deployment, you need to go into your deployment's "playground" in azure ai studio and then click "view code" to find the correct one:

Image

PankajBhojwani commented 3 months ago

Agreed that it is quite difficult to find the correct endpoint unfortunately, even in my screenshot the correct endpoint is not the one in the textbox, it is the one in the curl command (the one that is blanked out but pointed to with the red arrow)