Logo Lanfrica

biruk2080/ChatBot

Domain:

natural language processing

Record type:

software
Creator:
bir
Host:
It is a multilingual AI chatbot that answers US immigration questions in the user's input language. It detects whether the user writes in English, Amharic, or another language and responds accordingly. # Multi-language US Immigration Assistant — Documentation ## Overview The **Amharic US Immigration Assistant** is a multilingual AI chatbot that answers US immigration questions in the user's input language. It detects whether the user writes in English, Amharic, or another language and responds accordingly. The assistant is scoped strictly to US immigration topics — questions outside that domain receive a polite redirect.It is built on Google's Gemini 2.5 Flash model, orchestrated through LangChain, and exposed via a Gradio chat interface with persistent in-session memory. --- ## Features - Multilingual responses — automatically replies in the language the user writes in (e.g., Amharic, English) - Scoped to US immigration topics only — out-of-scope questions are gracefully declined - Persistent in-session conversation memory via `InMemoryChatMessageHistory` - Clean chat UI built with Gradio `Blocks` - Configurable per-session history keyed by `session_id` --- ## Tech Stack | Layer | Technology | Purpose | |---|---|---| | **LLM** | Google Gemini 2.5 Flash (`langchain_google_genai`) | Multilingual natural language generation | | **Prompt orchestration** | LangChain `ChatPromptTemplate` | Structures system instructions and conversation history | | **Memory** | LangChain `InMemoryChatMessageHistory` + `RunnableWithMessageHistory` | Persists conversation turns within a session | | **Output parsing** | LangChain `StrOutputParser` | Extracts plain text from LLM responses | | **UI Framework** | Gradio `gr.Blocks` | Chat interface with message input and history display | | **Configuration** | `python-dotenv` | Loads `GOOGLE_API_KEY` from a `.env` file at runtime | | **Language** | Python 3.9+ | Application runtime | --- ## Architectural View The system is organised into three layers: a **UI layer** (Gradio), a **chain layer** (LangChain pipeline with memory), and an **AI layer** (Google Gemini via LangChain). ``` ┌──────────────────────────────────────────────── …

Languages