Skip to content

A humanlike AI companion designed with thoughts, feelings, and memories

License

Notifications You must be signed in to change notification settings

fungamer2-2/HumanlikeAI

Repository files navigation

HumanlikeAI

GitHub commit activity GitHub last commit GitHub License

An AI companion designed for more humanlike interactions. The goal is to create a humanlike AI system that isn't just an assistant, but a virtual companion that you can form connections with.

Currently uses Mistral AI models. To use this project, you'll need a Mistral AI API key, and store it under MISTRAL_API_KEY in a .env file.

  1. Download this project
  2. Make sure that Python is installed
  3. Obtain a Mistral API key at https://console.mistral.ai/
  4. Store the API key in a .env file in the project directory
  5. Make sure to install the requirements: pip install -r requirements.txt
  6. Run main.py

If you find a bug or have a feature request, feel free to open an issue.

Thought system

Before responding, the AI is prompted to generate a list of thoughts from its perspective. These thoughts are treated as the AI's "inner monologue." This helps make it a bit more realistic, and think as if it truly had its own personality.

Additionally, the AI is designed to look for and gather insights to add to its memory, in order to gain a higher-level understanding of the user.

Emotion system

The emotion system is based on the PAD (Pleasure-Arousal-Dominance) state model. Interactions with the AI will elicit emotions, which affect its mood. Its current emotions may affect its responses.

Memory system

The AI companion also has a long-term memory system to recall relevant memories and insights from previous conversations. It includes two types of memory: short-term and long-term.

  • Short-term memory: Memories that the AI has either experienced recently or recalled recently. This is always available in-context, but has a limited capacity, and any memories that get flushed out of short-term memory are sent to long-term memory.
  • Long term memory: Stores the memories and experiences to be retrieved whenever they become relevant. Recalled memories return to short-term memory.

Releases

No releases published

Packages

No packages published

Languages