Skip to content

This Python application utilizes the Gemini Pro API from google.generativeai to create an interactive chat interface. It allows users to have a conversation with the Gemini Pro AI model, with features like viewing chat history, restarting chats, and automatically saving chat sessions to a text file with timestamps.

License

Notifications You must be signed in to change notification settings

llegomark/gemini-pro-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gemini Pro Chat Application

This Python application utilizes the Gemini Pro API from google.generativeai to create an interactive chat interface. It allows users to have a conversation with the Gemini Pro AI model, with features like viewing chat history, restarting chats, and automatically saving chat sessions to a text file with timestamps.

Installation

Prerequisites

  • Python 3.x
  • Pip package manager
  • An API key for Gemini Pro

Setup

  1. Clone the repository:

    git clone https://github.com/llegomark/gemini-pro-chat.git
    cd gemini-pro-chat
  2. Install required Python packages:

    pip install -r requirements.txt
  3. Create a .env file in the project directory and add your Gemini Pro API key:

    GEMINI_API_KEY=your_api_key_here
    

Usage

Run the application using Python:

python chat.py

Commands

  • Type your message and press Enter to chat with Gemini Pro.
  • Type history to view the complete chat history.
  • Type restart to start a new chat session while saving the current session to chat_history.txt.
  • Type exit to exit the application and save the current session.

Features

  • Interactive chat with Gemini Pro AI.
  • View chat history within the application.
  • Automatically saves chat sessions with timestamps.
  • Supports restarting chat sessions while preserving history.
  • Streaming output for a more natural chat experience.

Contributing

Contributions to the Gemini Pro Chat Application are welcome. Please feel free to fork the repository, make improvements, and submit pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

This Python application utilizes the Gemini Pro API from google.generativeai to create an interactive chat interface. It allows users to have a conversation with the Gemini Pro AI model, with features like viewing chat history, restarting chats, and automatically saving chat sessions to a text file with timestamps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages