This Python FastAPI project integrates LangChain for implementing an AI Agent, leveraging a CosmosDB vector store for text retrieval and to query.
- Utilizes FastAPI for building a high-performance web API.
- Integrates LangChain for implementing AI Agent
- Utilizes CosmosDB vector store for efficient text retrieval based on semantic similarity.
- Python environment with FastAPI, LangChain, and Azure SDK installed.
- Access to Azure subscription for deploying CosmosDB.
- Basic knowledge of FastAPI, LangChain and CosmosDB.
- Clone the repository to your local machine.
- Set up CosmosDB for MongoDB VCore Vector Store in your Azure subscription.
- Create .env file and populate:
- OPENAI_API_KEY=''
- MONGO_CONNECTION_STRING=''
- Create pythonn env:
python -m venv venv
- Install Requirements:
venv\Scripts\activate
python -m pip install -r requirements.txt
- Run the FastAPI server:
python main.py
- View the Swagger Docs: http://127.0.0.1:8000/docs
This project is licensed under the MIT License, granting permission for commercial and non-commercial use with proper attribution.
For any questions or issues, please open an issue on GitHub or reach out to the project maintainers.
This project is provided for educational and demonstration purposes only. Use at your own risk.