How hamdane1548/agent_location_voiture works
Opoo Car Rental is a React chat interface backed by a FastAPI rental assistant. A customer submits a question with recent conversation history; the API builds a retrieval query, searches rental-document context in Chroma, and asks an OpenRouter model to produce a response using both retrieved information and the documented vehicle catalog. The backend also contains PDF embedding and vector-save functionality. The README documents the frontend-to-API connection; some ingestion details are supported by module references rather than a shown end-to-end ingestion route.
Main entry points: agentConnect.py Answer generation · Agent.tsx Chat page · router.tsx Chat route · Main-Layout.tsx Page layout
Components 19
Chat interface
- React application
SupportClient/src/App.tsx - Chat route
SupportClient/src/Router/router.tsx - Page layout
SupportClient/src/Layout/Main-Layout.tsx - Header and logo
SupportClient/src/Components/ui/Header.tsx - Footer
SupportClient/src/Components/ui/Footer.tsx - Interactive logo
SupportClient/src/Components/Logo.tsx - Chat page
SupportClient/src/pages/Agent.tsx - Assistant avatar
SupportClient/src/Components/ui/shdr-19.tsx
Assistant API
- Chat endpoint
agent_backend/src/agent/agentConnect.py - Answer generation
agent_backend/src/agent/agentConnect.py - Rental catalog prompt
agent_backend/src/agent/agentConnect.py
Document retrieval
- Text embeddings
agent_backend/src/Embeddings/Embedding.py - Chunk model
agent_backend/src/Model/Chunks.py - Vector search and save
agent_backend/src/Services/ChromaDBServices.py
Configuration and storage
- Backend settings
agent_backend/src/Settings.py - Chroma connection
agent_backend/src/infrastructure/chromedb.py
External services
- Chroma Cloud
- OpenRouter model
Other components
- Customer
Connections 19
- Customer → Chat page: asks
SupportClient/src/pages/Agent.tsx - React application → Chat route: provides routes
SupportClient/src/App.tsx - Chat route → Page layout: renders
SupportClient/src/Router/router.tsx - Chat route → Chat page: renders
SupportClient/src/Router/router.tsx - Page layout → Header and logo: renders
SupportClient/src/Layout/Main-Layout.tsx - Page layout → Footer: renders
SupportClient/src/Layout/Main-Layout.tsx - Header and logo → Interactive logo: renders
SupportClient/src/Components/ui/Header.tsx - Chat page → Assistant avatar: renders
SupportClient/src/pages/Agent.tsx - Chat page → Chat endpoint: posts question
SupportClient/src/pages/Agent.tsx - Chat endpoint → Answer generation: generates answer
agent_backend/src/agent/agentConnect.py - Answer generation → Text embeddings: embeds query
agent_backend/src/agent/agentConnect.py - Text embeddings → Vector search and save: queries vectors
agent_backend/src/Embeddings/Embedding.py - Vector search and save → Chroma connection: gets client
agent_backend/src/Services/ChromaDBServices.py - Chroma connection → Chroma Cloud: queries collection
agent_backend/src/infrastructure/chromedb.py - Answer generation → Rental catalog prompt: builds prompt
agent_backend/src/agent/agentConnect.py - Answer generation → OpenRouter model: requests completion
agent_backend/src/agent/agentConnect.py - Chroma connection → Backend settings: reads credentials
agent_backend/src/infrastructure/chromedb.py - Chat endpoint → Backend settings: reads model key
agent_backend/src/agent/agentConnect.py - Text embeddings → Chunk model: processes document chunks