microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.59k stars 2.48k forks source link

Does this sample also work with deployed prompt flows? #395

Open christopher-wilke opened 10 months ago

ntabernacle commented 9 months ago

Did you ever get this working? Looks like it would need to point to a end point.

christopher-wilke commented 9 months ago

Yes, you also need to make sure to update the data model.

ntabernacle commented 9 months ago

Thanks. So,

AZURE_OPENAI_MODEL AZURE_OPENAI_ENDPOINT

You updated from the promptflow deployment and it worked?

placeholger313 commented 8 months ago

Yes, you also need to make sure to update the data model.

Means flow prompt should be configured to handle input/output as descibed in REST API docs and then it should work? (+adjusting endpoint URL and key)

input: {"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Does Azure OpenAI support customer managed keys?"},{"role": "assistant", "content": "Yes, customer managed keys are supported by Azure OpenAI."},{"role": "user", "content": "Do other Azure AI services support this too?"}]}

output:

"object":"chat.completion","created":1679072642,
"model":"gpt-35-turbo",
"usage":{"prompt_tokens":58,
"completion_tokens":68,
"total_tokens":126},
"choices":[{"message":{"role":"assistant",
"content":"Yes, other Azure AI services also support customer managed keys. Azure AI services offer multiple options for customers to manage keys, such as using Azure Key Vault, customer-managed keys in Azure Key Vault or customer-managed keys through Azure Storage service. This helps customers ensure that their data is secure and access to their services is controlled."},"finish_reason":"stop","index":0}]}

Has someone tested it and can confirm? Thx