Coder Social home page Coder Social logo

gemini-chat's Introduction

Gemini Chat

Gemini Chat is a streamlined command-line interface (CLI) tool designed to facilitate real-time conversations with Google's gemini-pro model. Users can engage in interactive dialogues directly from their terminal with each chat session saved in a markdown file within the .history directory, ensuring no moment of interaction is lost.

Requirements

  • Go: Gemini Chat is built with Go. Ensure you have Go 1.22.0 or later installed on your system. You can download it from the official Go website.
  • Environment Variable: To use Gemini Chat, you must have the GEMINI_API_KEY environment variable set with your API key for the Gemini model. You can obtain an API key by signing in to Google AI Studio.

Setup

  1. Clone the Project: Start by cloning the Gemini Chat repository to your local machine.

    git clone [email protected]:melvinalmonte/gemini-chat.git
    cd gemini-chat
  2. Set Environment Variable: Before running Gemini Chat, you need to set the GEMINI_API_KEY environment variable. This can be done as follows:

    For Unix/Linux/macOS:

    export GEMINI_API_KEY="your_api_key_here"

    For Windows Command Prompt:

    set GEMINI_API_KEY=your_api_key_here

    For Windows PowerShell:

    $env:GEMINI_API_KEY="your_api_key_here"
  3. Build the Project: While in the project directory, compile the application using Go.

    go build

    This command creates an executable named gemini-chat in your current directory.

Usage

To start a chat session, simply run the executable from your terminal:

./gemini-chat

Follow the prompts to begin chatting with the gemini-pro model. Your chat history will be saved in the .history directory after each session, with filenames formatted as chat_history_YYYY_MM_DD_HHMMSS.md.

To exit the chat, press CTRL+C or submit an empty message.

Example interaction

---------------------------------------------------------------------------------------
Terminal chat started. Type something and press enter (CTRL+C to exit).
---------------------------------------------------------------------------------------
Me: Hello, how are you?
Gemini: 
I'm doing well, thank you for asking! How can I assist you today?
Me: What's the weather like?
Gemini: 
I'm not currently connected to real-time data, but I can provide weather forecasting tips if you'd like.

Todos

  1. Make it actually useful.
  2. Add shift-enter functionality to send messages.
  3. Add feature to send files and images.
  4. Enhance error handling and user feedback.

gemini-chat's People

Contributors

melvinalmonte avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.