Back to 交个朋友
AI C

AI C

An intelligent chat assistant powered by OpenAI GPT, with conversation history and context awareness.

XTAugust 20, 2024交个朋友

An AI-powered chat assistant that provides intelligent responses using OpenAI's GPT models. Features conversation history, context awareness, and support for multiple conversation modes.

Features

  • GPT Integration: Powered by OpenAI GPT-4 for intelligent responses
  • Conversation History: Save and retrieve past conversations
  • Context Awareness: Maintains context across multiple messages
  • Multiple Models: Switch between different GPT models (GPT-3.5, GPT-4)
  • Streaming Responses: Real-time streaming of AI responses for better UX
  • Export Conversations: Export chat history as Markdown or JSON
  • Dark Mode: Beautiful dark theme for comfortable use

Technologies

  • Next.js 14: React framework with App Router
  • OpenAI API: GPT model integration
  • TypeScript: Type safety throughout the application
  • React Server Components: Optimized server-side rendering
  • Tailwind CSS: Modern styling
  • Vercel AI SDK: Simplified AI integration
  • PostgreSQL: Conversation history storage

Key Features

The assistant supports multiple conversation modes including general chat, code assistance, writing help, and creative brainstorming. Each conversation maintains its own context for coherent multi-turn interactions.

Privacy & Security

All conversations are encrypted at rest and in transit. Users can delete their conversation history at any time. API keys are securely stored and never exposed to the client.

Getting Started

git clone https://github.com/yourusername/ai-chat-assistant
cd ai-chat-assistant
pnpm install
cp .env.example .env
# Add your OpenAI API key to .env
pnpm dev

Demo

Try the live demo at demo.example.com to experience the AI assistant in action.