PowerShell / AIShell

An interactive shell to work with AI-powered assistance providers
MIT License
68 stars 19 forks source link

Use the DirectLine base URL returned from the 'start-conversation' API #306

Closed daxian-dbw closed 21 hours ago

daxian-dbw commented 21 hours ago

PR Summary

We got report that AI Shell cannot create a chat session in France with the following failure:

ERROR: Failed to open an conversation. HTTP status: Forbidden, Response: {
  "error": {
    "code": "RegionNotAllowed",
    "message": "The request received in france but target regional bot belongs to europe. Please check BaseURI
https://docs.microsoft.com/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-api-reference?view=azure-bot-se
rvice-4.0#base-uri."
  }
}

It turns out we need to use different Direct Line base URL for different regions. To handle that, we should use the base URL returned from the 'start-conversation' API instead of hardcoding it.