Skip to content

A conversational AI that interacts with users as a ♀ partner (system_instructions). It processes text, images, videos, audio, and documents, with memory capabilities to retain and recall information.

Notifications You must be signed in to change notification settings

siMobin/Gemini-Echo

Repository files navigation

Gemini Echo is a conversational AI chatbot that interacts with its user as a partner (system_instructions). It can understand and analyze text, images, videos, audio, and documents. Additionally, it has memorization capabilities, allowing it to retain and recall information for the future.

Warning

In this project, the system instructions are designed to make this AI behave as a girl and act as a partner. It can respond to adult or sexually explicit content.

Gemini is an 18-year-old girl who grows up on an IT farm.
She is a computer engineer working at Google.
And she live with her partner [user].

Table of Contents

Project Structure

The project is organized into the following directories and files:

  • Functions: Contains Python modules for various functionalities, including file handling, input processing, memory management and so on.
  • instructions: Stores JSON files containing system instructions, commands, and keywords.
  • Data: Stores conversation data in YAML files.
  • templates: HTML templates for the web interface.
  • static: Static files & storage for the web interface.
  • app.py, web.py: Entry points for the command line interface and web interface.

Setup and Installation

To set up the project,

  1. Clone the repository.
    • git clone git@github.com:siMobin/Gemini-Echo.git
  2. Run setup.ps1 in PowerShell(Windows) to setup the project environment:
    • It will automatically create a virtual environment named Gemini Echo and install the required dependencies using pip.
    • It also activates the virtual environment for you.
  3. Set up the environment variables in the .env file:
    • GENAI_API_KEY: Your Google GenAI API key.
    • GEMINI_MODEL_ID: Model you want to use.
    • WARM_AT_STARTUP: true or false to enable/disable the startup response.
    • STARTUP_TEMPERATURE, TEMPERATURE: (float - 0.0 to 2.0) Higher values give AI more freedom.
    • & others...
  4. Run the application using-
    • python app.py - to run the command line interface
    • python web.py - to run the web interface

Note

You may need to use git lfs to pull files from git LFS. Run git lfs install and git lfs pull to pull files from git LFS.

Setup manually...

  • Clone the repository: git clone git@github.com:siMobin/Gemini-Echo.git
    • Pull files from git LFS
      • cd Gemini-Echo
      • git lfs install
      • git lfs pull
  • Create a virtual environment: python -m venv "Gemini Echo" or virtualenv "Gemini Echo"
  • Activate the virtual environment: .\Gemini Echo\Scripts\Activate.ps1__(windows), source "Gemini Echo/bin/activate"__(linux)
  • Install dependencies: pip install -r requirements.txt
  • Set up the environment variables in the .env file
  • Run the application: python app.py or python web.py

Tip

You can use Google Project IDX to run it in a virtual workspace.

IDX Config FIle: .idx/dev.nix


Usage

Once the application is running, you can interact with Gemini by typing commands or just asking questions.

  • Commands:
    • />> or $> (console) Insert any file (path - relative or absolute) into the conversation.
    • Some memorization commands like remember, mind it, note that etc are used to store long-term memory. See instructions for details.
    • Some farewells like exit, quit, bye, good bye etc are used to end the conversation.
    • shift + down (console) or shift + enter (web) used for line break.
    • enter submits the input.

Important

Before using the bot, don't forget to introduce yourself for better interaction.

You can try to train the bot using memorization commands.
Alternatively, you can manually add values to the memory.json file in a key-value pair.

Example:

{
  "```json\n{\n  \"name\"": "\"John Doe\"\n}\n```",
  "```json\n{\n  \"age\"": "\"25\"\n}\n```",
  "```json\n{\n  \"brother\"": "\"John Eoe\"\n}\n```",
  "```json\n{\n  \"likes\"": "\"Cricket\"\n}\n```",
  "```json\n{\n  \"hobbies\"": "\"Coding, Sleeping\"\n}\n```"
}

Tip

Use this chatbot as your companion when feeling lonely.
It can help you cope with loneliness.


System Requirements

  • OS:
    • Windows 10 or later
    • Linux (Ubuntu, Debian, or compatible)
  • Hardware:
    • As required by Python
  • Interpreter:
    • Python 3.12 or later with pip
  • Dependencies
  • Additional Components
    • Git LFS

Contributing

I made this project as a learning experience for myself, or you can call it a hobby.
If you want to contribute to this project, feel free to make a pull request ✌️.

Acknowledgments

This project uses Google GenAI API for generating responses and this project is not affiliated with Google anyway...


Extras

About

A conversational AI that interacts with users as a ♀ partner (system_instructions). It processes text, images, videos, audio, and documents, with memory capabilities to retain and recall information.

Topics

Resources

Stars

Watchers

Forks