Skip to content

hahaCrazy/AI-Girlfriend

Repository files navigation

AI-Girlfriend

Based on langchain and streamlit. The project used chatgpt-3.5 model.

Try It Now Streamlit App

Function

  • Customize your own girlfriend
  • Chat context memory
  • Chat with images you can customize
  • Custom rule settings chatgpt

Technology stack:

  • streamlit + langchain + chatgpt
  • Note: Character picture information is stored using Chroma vector, that is, the prompt words and pictures correspond one to one. Call the tool of langchain agent to generate pictures

Project Structure

AI-Girlfriend
|-.streamlit                        #Streamlit project configuration files
|   |-config.toml
|   |-secrets.toml                  #Store secrets. In code, you can directly call st.secrets[“key”] to retrieve them.
|-.venv                             #Create a virtual environment using venv
|
|- characters/agent_character       #Character Resources
|            |-mina
|               |-mina_info.json    #Store character information such as name, appearance, personality, occupation, etc.
|               |-mina_img.csv      #Store images, with each image corresponding to its respective prompt word.                    
|            |-rias_gremory
|            |-serena
|            |-sophia
|- gallery                      #streamlit ui resource
|- home.py                      #Program entry point
|- requirements.txt             #Libraries that need to be installed
|- utils_prompt.py              #Custom Rules for ChatGPT
|- utils.py                     #Required tools, such as LangChain's proxy tool wrapper and Chromadb vector database

Installation Method

python -m venv .venv pip install -r requirements.txt

Startup Method

streamlit run .\home.py

Supplementary Notes

g1 g2 g3 g4 g5 g6

About

Choose your own ai girlfriend and start chatting

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages