Skip to content

micro/chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micro Chat

Multi-model AI chat app

Features

  • Multi-model support: Choose between OpenAI (gpt-4o, gpt-4-turbo, gpt-3.5-turbo) and Gemini (gemini-2.5-flash, gemini-2.5-pro, gemini-2.0-flash) models for each chat message.
  • Microservice architecture: The backend model service is decoupled from the web frontend using go-micro.
  • Modern web UI: Responsive, full-screen chat interface that works on desktop and mobile. Input is auto-focused for fast chatting.
  • OpenAI & Gemini integration: The backend calls the OpenAI or Gemini API to generate responses from the selected model.

Usage

Set your OpenAI API key (for OpenAI models):

export OPENAI_API_KEY=xxx

Set your Gemini API key (for Gemini models):

export GEMINI_API_KEY=yyy

Run it using Micro

micro run

Go to http://localhost:8080

Project Structure

  • model/ - Go microservice for model inference (calls OpenAI or Gemini API)
    • handler/handler.go - Implements the model handler logic
    • proto/ - Protobuf definitions and generated code
    • main.go - Service entrypoint
  • web/ - Go web service for the chat UI
    • main.go - Serves the HTML/JS frontend and proxies chat requests to the model service

TODO

  • Chat history
  • User login
  • So much more

About

Multi-model AI chat app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages