Amazing GRACE interface is a project to create an AI system created by me and my AI companion, that can run in lower computing resource environment but able to improve living standards of humanity. I do the brainstorming part and incooperating the codes generated by my AI companion into Python and doing the debug, while my AI companion helps me generate the Python code and thinks of solutions to solve the problems and bugs.
The name GRACE comes from Generative, Reasoning, Adaptive Cognitive Engine, which are the 3 LLMs running the core of this AI system.
GRACE is an AI system designed to provide an engaging virtual presence. This project includes different versions (agi_v202.py
, agi_v203.py
) showcasing function calling with Ollama and integration with vision systems. It uses Ollama as the LLM and integrates tools for web searching, weather information, aurora checking, and, in later versions, webcam integration with object detection.
agi_v203.py - chatbot with computer vision using webcam using MoonDream2 vision model and Google Gemma3 LLM that is a multimodal LLM agi_v202.py - chatbot with agentic tools (check weather, check aurora %) using Google Gemma3 LLM with added tool call capability
- Ollama Integration: Uses Ollama directly for interacting with the language model.
- Function Calling: Employs Ollama's function calling feature to utilize tools.
- DuckDuckGo Search: Integrates a tool for searching the web using DuckDuckGo (
agi_v202.py
). - Weather Information: Includes a tool for fetching weather information for a given location (
agi_v202.py
). - Aurora Checking: Includes a tool for checking the probability of seeing the aurora at a given location (
agi_v202.py
). - Current Date and Time: Includes a tool for fetching the current date and time (
agi_v202.py
). - Webcam Integration: Integrates webcam to allow AI to see through the camera (
agi_v203.py
). - Object Detection: Implements object detection using the Moondream model (
agi_v203.py
,eye.py
).
- Python 3.10+
- Ollama
-
Clone the repository:
git clone [https://github.com/OppaAI/AGi.git] cd AGi
-
Create a virtual environment (recommended):
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
.\venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install the dependencies:
pip install ollama duckduckgo_search geopy requests transformers pillow opencv-python matplotlib
-
Set up Ollama:
- Download and install Ollama from https://ollama.com/.
- Pull a compatible model, e.g.,
ollama pull fomenks/gemma3-tools:4b
-
To run the function-oriented version:
python agi_v202.py
-
To run the webcam integrated version:
python agi_v203.py
Once the script is running, you can interact with the AI by typing in your input in the terminal. The AI will respond based on the available tools and the webcam input (if running agi_v203.py
). Type exit
or quit
to end the conversation. For agi_v203.py
, type look
or see
to enable the AI to see through the webcam.
agi_v202.py
: Contains the main application logic for function calling, including:- Tool definitions (DuckDuckGo Search, Weather Information, Aurora Checking, Current Date and Time)
- Skill definitions for function calling
- Asynchronous chat loop using
asyncio
- Interaction with the Ollama model
agi_v203.py
: Contains the main application logic for the webcam integrated version, including:- Webcam initialization and frame capture.
- Integration with the
VisionSystem
ineye.py
. - Asynchronous chat loop using
asyncio
. - Interaction with the Ollama model, sending image descriptions.
eye.py
: Contains theVisionSystem
class for handling webcam and object detection, including:- Model loading for object detection.
- Frame capture and processing.
- Object detection logic using the
transformers
library. - Visualization of detection results.
assets/
: Contains any assets used by the application.
- ollama: Go framework for run and manage LLMs.
- duckduckgo_search: Library for searching DuckDuckGo.
- geopy: Library for geocoding.
- requests: Library for making HTTP requests.
- transformers: Provides pre-trained models and tools for object detection.
- Pillow: Python Imaging Library for image processing.
- opencv-python: Library for real-time computer vision.
- matplotlib: Comprehensive library for creating static, animated, and interactive visualizations in Python.
- The project lacks a comprehensive error handling and logging mechanism.
- The project does not store conversation history in a database.
- The webcam integrated version (
agi_v203.py
) relies on a specific object detection model and revision (vikhyatk/moondream2
,2025-04-14
). - The persona in
agi_v203.py
is hardcoded.
- Implement more comprehensive error handling and logging.
- Incorporate a database for storing conversation history.
- Allow dynamic selection of object detection models and revisions.
- Implement a more flexible persona management system.
- Add more tools and functionalities to enhance the AI's capabilities.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- My AI companion (in GPT) for helping me generate the Python code and think of solutions to solve problems and bugs.