microsoft / azurechat

🤖 💼 Azure Chat Solution Accelerator powered by Azure Open AI Service
MIT License
1.24k stars 1.21k forks source link

COSMOS DB: Invalid URL #224

Open admin-thirdmind opened 1 year ago

admin-thirdmind commented 1 year ago

When I upload a document i get an "Invalid URL" error. I have manually entered the URI as well as the primary connection string in the configuration, but still it does not work.

For me, it seems that the endpoint and key variables are undefined.

const endpoint = process.env.AZURE_COSMOSDB_URI; const key = process.env.AZURE_COSMOSDB_KEY;

Any help would be much appreciated. Thanks!

admin-thirdmind commented 1 year ago

Ok, fixed it.

The Document Intelligence endpoint was wrong. It had the Location (West Europe) in it.

schneutzi-81 commented 1 year ago

running in the same error : features\common\cosmos.ts (36:19) @ new CosmosDBContainer

34 | const key = process.env.AZURE_COSMOSDB_KEY; 35 |

36 | const client = new CosmosClient({ endpoint, key }); | ^ 37 | 38 | this.container = new Promise((resolve, reject) => { 39 | client.databases