Skip to content

mhphilip/laravel-ai-chat

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat Screenshot

Laravel AI Chat Starter Kit

This starter kit integrates the Vercel AI SDK UI with a Laravel backend powered by the Prism package, providing a solid foundation for building AI-driven chat applicaions in a familiar Laravel ecosystem.

  • ✅ Persistent Conversations
  • ✅ Tool Calling
  • ✅ Vercel AI SDK Stream Protocol
  • ✅ Generative User Interfaces
  • ✅ Prism Integration
  • ✅ Built On Laravel React Starter Kit

Installation

  1. Clone the repository and navigate to the project directory:

    git clone https://github.com/benbjurstrom/chat.git && cd chat
  2. Install Composer and NPM dependencies:

    composer install && npm install
  3. Copy the .env.example file and configure environment variables:

    cp .env.example .env && php artisan key:generate

    Edit the .env file to include your database credentials, LLM API keys, and desired LLM settings. For example, to use OpenAI:

    PRISM_PROVIDER=openai
    PRISM_MODEL=gpt-4o
    OPENAI_API_KEY=YOUR_OPENAI_API_KEY

    or to use Gemini:

    PRISM_PROVIDER=gemini
    PRISM_MODEL=gemini-2.0-flash
    GEMINI_API_KEY=YOUR_GEMINI_API_KEY

    or to use Ollama:

    PRISM_PROVIDER=ollama
    PRISM_MODEL=llama3.1
  4. Run database migrations:

    php artisan migrate --seed
  5. Start the development server:

    composer run dev
    • This command should launch both the Laravel server and the Vite development server.

Usage

After starting the servers, visit http://localhost:8000 and login using the default credentials to access the chat application.

  • Email: test@example.com
  • Password: password

Credits

License

This project is licensed under the MIT License. See the LICENSE file for more information.

About

✨ AI Chat Starter Kit For Laravel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 63.0%
  • PHP 35.0%
  • CSS 1.3%
  • Other 0.7%