RickStrahl / MarkdownMonster

An extensible Markdown Editor, Viewer and Weblog Publisher for Windows
https://markdownmonster.west-wind.com
Other
1.59k stars 235 forks source link

AI Feature: AI Request Failed invalid uri #1126

Closed EdCharbeneau closed 3 months ago

EdCharbeneau commented 3 months ago

When using Azure Open AI, I'm getting an error message when trying to use the summarize feature. It seems like the app isn't agreeing with the URI for some reason, however I have copied it directly from the Azure Portal. I've tried multiple deployments and keep getting the URI error. Is there something missing from the endpoint format? My settings are below:

Endpoint https://aisamplesinstance.openai.azure.com/openai/deployments/demo4o/chat/completions?api-version=2023-03-15-preview

Settings image

Summarize doc error image

RickStrahl commented 3 months ago

Azure OpenAI configuration is a pain because it doesn't use the standard OpenAI endpoint/apikey, but rather relies on endpoint deployment and apikey.

It works like this for you:

Endpoint: https://aisampleinstance.openai.azure.com/
ModelD: demo4o

I believe this is the same that Semantic Kernel uses (MM uses a custom plain Http client). The endpoint is the API base URL for all access modes (ie. without the chat/completions and/or deployment name) - again mostly to match the SK syntax.

Documented here

The docs are still in progress with this but the configuration is fairly well covered in that topic.

Let me know if that works for you.

EdCharbeneau commented 3 months ago

It's working now thank you.

I had to apply the changes and restart. 👍