Skip to content

samaea/azure-openai-assistant-with-chainlit

 
 

Repository files navigation

Azure OpenAI Assistant

You can deploy your Azure OpenAI assistant with Chainlit using this template. openai-assistant

Supported Assistant Features

Streaming Files Code Interpreter File Search Voice

Instructions

  1. Provision an Azure OpenAI resource and create a deployment for gpt-4 (Model number:- 0125). Assistants API (Preview) is only supported in certain regions and models. In addition, only certain API versions are supported

  2. Update .env.sample with the correct Azure OpenAI configuration (leave OPENAI_ASSISTANT_ID blank for now, we will create it in step 4). Rename ".env.sample" to ".env".

  3. Install the required Python modules

    pip install -r requirements.txt
    
  4. Create an Assistant

    & python create_assistant.py
    

    Copy the ID value from the output "Assistant created with ID: X" and update .env OPENAI_ASSISTANT_ID with the value of X.

  5. Run chainlit

    chainlit run app.py  -w
    

About

Based on https://github.com/Chainlit/openai-assistant, but adapted to demonstrate it working with Azure OpenAI Assistant.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%