Skip to content

eetuhoo/azure-role-based-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

azure-role-based-assistant

Backend implementation for a simple AI assistant using Azure OpenAI, Azure AI Search, and FastAPI.

This project demonstrates how to create an intelligent assistant, that responds to questions based on their role (e.g. HR, IT). It utilizes retrieval-augmented generation (RAG) technique to provide accurate answers from internal data.

Setup instructions

  1. Clone repository:
git clone https://github.com/eetuhoo/azure-role-based-assistant.git
cd azure-role-based-assistant
  1. Create virtual environment and activate it:
python -m venv venv
venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Create .env file for environment variables:
AZURE_OPENAI_ENDPOINT=...
AZURE_OPENAI_API_KEY=...
AZURE_OPENAI_DEPLOYMENT=...
AZURE_OPENAI_API_VERSION=...
AZURE_SEARCH_ENDPOINT=...
AZURE_SEARCH_API_KEY=...
AZURE_SEARCH_INDEX=...

How to run

uvicorn main:app --reload

Test API endpoint /rag-ask in e.g. Swagger-documentation:

http://localhost:8000/docs
POST /rag-ask
{
  "role": "IT",
  "question": "Kuinka uusin salasanani?"
}

The backend should respond with a role-specific answer.

About

A small web development project, that includes the use of Azure's AI services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages