Skip to content

creation22/samagpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

🧠 AltmanGPT

AltmanGPT is an immersive AI "Digital Twin" of Sam Altman, designed to simulate conversation with the OpenAI CEO. It goes beyond simple mimicry by using RAG (Retrieval-Augmented Generation) to ground every answer in Sam's actual blog posts, essays, and public writings.

Featuring a "YC Partner Roast Mode", Voice Input, and a premium dark-mode aesthetic, this project demonstrates how to build high-quality, persona-driven AI applications using Google's Gemini 2.5 Flash model.

AltmanGPT Demo (Add your screenshot here)


✨ Key Features

  • 🧠 Authentic RAG Intelligence: Answers are retrieved from a vector database (Pinecone) containing Sam Altman's real writings, ensuring the advice is grounded in his philosophy.
  • 🔥 "Roast My Startup" Mode: A toggleable mode where the AI switches personas from "Calm CEO" to "Ruthless YC Partner," specifically designed to stress-test startup pitches.
  • 🎙️ Voice-First Interface: Real-time Speech-to-Text integration allows users to speak directly to the AI, creating a more natural conversational flow.
  • 🔐 User Authentication: Secure Google Sign-In integration via Firebase Authentication.
  • 🎨 Premium Aesthetic: A bespoke "Crimson/Dark" UI with glassmorphism, smooth animations, and the Inter typography system.

🛠️ Tech Stack

Frontend

  • Framework: React.js (Vite)
  • Styling: Tailwind CSS + Custom CSS Variables
  • Auth: Firebase Authentication (Google Provider)
  • State: React Hooks (useState, useEffect, useRef)
  • Icons: Lucide React

Backend

  • Runtime: Node.js & Express
  • AI Model: Google Gemini 2.5 Flash (via @google/genai SDK)
  • Vector DB: Pinecone (for RAG context retrieval)
  • Embedding: Text embedding model for semantic search

🚀 Getting Started

Prerequisites

  • Node.js (v18+)
  • A Google Gemini API Key
  • A Pinecone API Key (and an index named samagpt)
  • A Firebase Project

1. Clone the Repository

git clone https://github.com/creation22/samagpt.git
cd samagpt

2. Backend Setup

Navigate to the backend folder and install dependencies:

cd backend
npm install

Create a .env file in the backend directory:

API_KEY=your_google_gemini_api_key
PINECONE_API_KEY=your_pinecone_api_key

Start the backend server:

node server.js

Server runs on http://localhost:5000

3. Frontend Setup

Navigate to the frontend folder and install dependencies:

cd ../frontend
npm install

Configure Firebase: Open src/firebase.js and replace the placeholder config with your Firebase credentials:

const firebaseConfig = {
  apiKey: "YOUR_API_KEY",
  authDomain: "YOUR_PROJECT.firebaseapp.com",
  // ... other keys
};

Start the development server:

npm run dev

Frontend runs on http://localhost:5173


💡 How It Works (Architecture)

  1. Input: User types or speaks a question (e.g., "How do I find product-market fit?").
  2. Context: The backend queries Pinecone for the most relevant paragraphs from Sam's blog.
  3. Prompting: The system constructs a prompt combining:
    • The User's Question
    • The Retrieved Context
    • The Selected Persona (Standard vs. Roast)
  4. Generation: Google Gemini 2.5 Flash generates a response in Sam's style.
  5. Delivery: The response is streamed/sent back to the React UI.

📄 License

This project is open-source and available under the MIT License.


Built with ❤️ for the Hackathon.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors