Azure / azure-functions-openai-extension

An extension that adds support for Azure OpenAI/ OpenAI bindings in Azure Functions for LLM (GPT-3.5-Turbo, GPT-4, etc)
MIT License
80 stars 29 forks source link

Support managed identity for chat storage table client and move out of host json #102

Closed maggie-li closed 3 months ago

maggie-li commented 4 months ago

This PR adds support for managed identity with table storage, which is used to store chat history. This implementation has been tested to work with:

Alongside the expected configs which can be found in the base README.md, here are the additional expected settings for each of the scenarios: For both system and user assigned a user must have:

"ChatStorage__tableServiceUri": "https://<>.table.core.windows.net"

System assigned managed identity on Azure:

User assigned managed identity on Azure: "ChatStorage__credential": "managedidentity" "ChatStorage__managedIdentityResourceId" or "ChatStorage__managedIdentityClientId" but not both

Local user account:

"ChatStorage": "UseDevelopmentStorage=true" Connection string:

"ChatStorage": "<connection_string_to_desired_storage>"

To-do

manvkaur commented 4 months ago

bump the package version in build.props and update CHANGELOG.md for this change

manvkaur commented 3 months ago

@microsoft-github-policy-service agree company="Microsoft"

manvkaur commented 3 months ago

This PR looks good. One thing I wanted to follow up on is if we're having tests for the managed identity vs connection string scenario?

Thank for reviewing this Aishwarya. Yes, I am creating mock unit tests for assistant service first and then other features slowly.