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
79 stars 29 forks source link

Assistants - chat bots with skills #14

Closed cgillum closed 9 months ago

cgillum commented 9 months ago

This PR adds support for "assistants" - i.e., chat bots that can invoke functions as custom skills.

What's new

To support assistants, a new AssistantSkillTrigger is introduced. Any such functions in your project become automatically callable by chat bots. A sample demonstrating this is also included in the PR.

How it works

As part of this change, whenever a prompt is sent to a chat bot, the list of AssistantSkillTrigger functions are sent to the GPT language model. The model can then decide to respond by invoking one of those functions, which is done by the updated entity logic. The response is then sent back to the model so that it can respond to the user prompt appropriately.

image (Image is borrowed from a Japanese presentation, introducing this idea)

Remaining work

Future improvements

cgillum commented 9 months ago

A few other minor changes I made as part of this PR:

manvkaur commented 9 months ago

We can add the pending tasks or future improvements to our internal board backlog

cgillum commented 9 months ago

BTW, here's what the conversation history looks like in Azure Table Storage after running the demo script.

image