https://github.com/aqeeljanjua/offline_agent__ollama_deepseek
An Offline intelligent inventory management system that uses LLMs (Large Language Models) to process natural language queries and manage inventory data through MongoDB.
https://github.com/aqeeljanjua/offline_agent__ollama_deepseek
agentic-ai deepseek-ai deepseek-r1 offline-agent offline-ai-agent offline-ai-solutions ollama-deepseek ollama-python
Last synced: 19 days ago
JSON representation
An Offline intelligent inventory management system that uses LLMs (Large Language Models) to process natural language queries and manage inventory data through MongoDB.
- Host: GitHub
- URL: https://github.com/aqeeljanjua/offline_agent__ollama_deepseek
- Owner: aqeeljanjua
- Created: 2025-02-05T19:46:27.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2025-02-05T20:07:22.000Z (4 months ago)
- Last Synced: 2025-02-17T03:47:55.445Z (4 months ago)
- Topics: agentic-ai, deepseek-ai, deepseek-r1, offline-agent, offline-ai-agent, offline-ai-solutions, ollama-deepseek, ollama-python
- Language: Python
- Homepage: htttps://shadowanalytics.ai
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Offline AI Agent with Ollama & DeepSeek
An offline-capable AI agent that leverages DeepSeek and Llama2 models through Ollama for natural language processing and intelligent inventory management, with MongoDB integration for data persistence.
## Overview
This project demonstrates an intelligent system that can:
- Process natural language queries offline using local LLM models
- Manage inventory data through MongoDB
- Handle complex business logic without internet connectivity
- Maintain conversation context and chat history
- Generate dynamic database queries from natural language input## Key Components
- **Ollama Integration**: Local model management and inference
- **DeepSeek Model**: Primary language model for query processing
- **MongoDB Backend**: Persistent data storage and retrieval
- **Query Processing**: Natural language to database query conversion
- **Session Management**: Maintains context across conversations## Developer
Muhammad Aqeel Yasin
Shadow Analytics## Features
- Natural language query processing using Deepseek and Llama2 models
- MongoDB integration for data persistence
- Intelligent query parsing and response generation
- Real-time inventory tracking
- Supplier management
- Chat history tracking
- Session-based interactions## Prerequisites
- Python 3.8+
- MongoDB
- Ollama## Installation
1. Clone the repository
```bash
git clone [repository-url]
```2. Install required packages
```bash
pip install -r requirements.txt
```3. Install and start MongoDB
4. Install Ollama and pull required models
```bash
ollama pull deepseek-r1:14b
```## Usage
1. Start the application:
```bash
python main.py
```2. Enter natural language queries, for example:
- "What is the current stock level of laptops?"
- "Who is the supplier for item ID 1?"
- "Update stock level for laptops"## Project Structure
- `main.py` - Application entry point
- `query_agent.py` - Main query processing agent
- `database_setup.py` - MongoDB database initialization and operations
- `ollama_helper.py` - LLM integration helper
- `prompt_manager.py` - Manages system prompts
- `query_generator.py` - Generates database queries from natural language## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.