Azure-Samples / cosmosdb-chatgpt

Sample application that combines Azure Cosmos DB with Azure OpenAI ChatGPT service
MIT License
255 stars 309 forks source link

How to deploy this app w/ pre-existing Azure resources. #44

Closed tim-chaffin closed 1 year ago

tim-chaffin commented 1 year ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] feature request

Minimal steps to reproduce

We already have an existing Azure OpenAI account, and a CosmosDB account. We'd like to be able to spin up this app, and point it to the afore mentioned existing services.

Any log messages given by the failure

N/A

Expected/desired behavior

Clone the web app only, and use environment variables or secrets in a pipeline to spin up the app using pre-existing Azure resources.

OS and Version?

GitHub Actions or Bitbucket Pipelines, using an Ubuntu based Docker container.

Versions

N/A

Mention any other details that might be useful


Thanks! We'll be in touch soon.

markjbrown commented 1 year ago

You can do this yourself fairly easily by removing the resources you have already deployed, deploy the Web App resources, then add the connection information to the Configuration settings in the Web App.

Thanks.

DevMan01 commented 1 year ago

Good call out, I deployed it and I can see how easy it would be to make this change. I agree, a different flavor of the template is certainly not needed.

On this note, however, I do see some AZD examples that use Cognitive Services - Search. Is that something you'd replace with CosmosDB? Or can that service be used to add weights to the OpenAI service?

markjbrown commented 1 year ago

I'm not sure exactly what examples you're referring to. I've seen a number of new ones that include ACS and Azure OpenAI. There are some scenarios where one might use an operational database instead of ACS but it really boils down to the user's needs.

DevMan01 commented 1 year ago

Here's an example. I couldn't get it to deploy successfully, I got a bunch of python errors during the azd process. But, I'm curious if Cognitive Search and CosmosDB are being used between these two templates interchangeably.

markjbrown commented 1 year ago

I don't see Cosmos being deployed there at all.

Not sure if you mean sharing with this template. That's not the case at all. The template here is bespoke.