Coding-Crashkurse / AI-Girlfriend

Repo contains project for how to create an AI Girlfriend, who is able to chat with you

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AI-Girlfriend

Partner Image

This project integrates a FastAPI backend with an Angular frontend to create a conversational AI interface. The backend is responsible for communicating with OpenAI's APIs for chat generation and image creation. The frontend provides the interactive user interface for chat and displays the generated images.

Backend

The backend service is built with FastAPI. It handles requests from the frontend, communicates with OpenAI's API, and returns the AI's responses and images back to the frontend.

Setup

To set up and run the backend:

  1. Navigate to the backend directory from the root of the project.

  2. Install the dependencies using pip:

pip install -r requirements.txt

Start the FastAPI server:

uvicorn app:app --reload --port 8000

Configuration

Ensure that you have the following environment variables set:

  • OPENAI_API_KEY: Your OpenAI API key.

Frontend

The frontend is an Angular application that provides the chat UI. Users can send messages, receive responses, and view images generated by the AI.

Setup

To get the frontend up and running:

  1. Navigate to the frontend directory from the root of the project.

  2. Install the dependencies with npm:

npm install

Serve the application locally:

ng serve

Open your web browser and go to http://localhost:4200 to view the application.

Make sure the backend service is running as the frontend will need to communicate with it to function properly.

About

Repo contains project for how to create an AI Girlfriend, who is able to chat with you


Languages

Language:TypeScript 54.3%Language:HTML 22.2%Language:CSS 12.5%Language:Python 6.1%Language:JavaScript 4.9%