Skip to main content

Prerequisites

1

Install Package

Install required packages:
streamlit for UI
praisonaiagents[llm] for Gemini model access (It uses Litellm)
2

Setup Environment

Configure environment:
Get your API key from Google AI Studio
3

Create File

Create a new file called app.py and add the following code:
4

Run Application

Start the Streamlit application:

Code

Features

Interactive Chat

Real-time chat interface with message history.

Knowledge Base

RAG capabilities with ChromaDB integration.

Model Integration

Uses Google’s Gemini Pro model.

Session Management

Maintains chat history in session state.
Make sure you have a valid Google API key and sufficient quota for using Gemini models.