Code Monkey home page Code Monkey logo

gemini-chat's Introduction

Purpose

This is intended to serve as a proof of concept for features that I would like to see in other chatbots, such as:

  • Conversation export/import to/from JSON
  • Editing of responses
  • The ability to edit old prompts in their old context
  • Easy deletion
  • No censorship

Even without the last point, this is a combination that is absent from all major LLM chat interfaces that I have tried, which include ChatGPT, Google Gemini, Mistral, Perplexity, Openrouter.ai Playground, Claude.ai and Poe. You often have a few of these features, but not all of them together.

How to use

This requires python and the flask and requests python libraries. If they are not installed on your machine, you may install them in a virtual environment from a POSIX shell:

python -m venv /path/to/venv
source /path/to/venv/bin/activate
pip install flask requests

Either export GEMINI_CHAT_API_KEY=YOUR_API_KEY or echo YOUR_API_KEY > ${HOME}/.gemini-chat-api-key, replacing YOUR_API_KEY with your gemini API key. The former will need to be done before future sessions while the latter will persist across sessions. The environment variable takes precedence over the key file.

If you do not have an API key, you may get one at:

https://makersuite.google.com/app/apikey

Then simply run:

python /path/to/app.py

You may then go to http://localhost:5000 in your web browser.

Future launches would require running source /path/to/venv/bin/activate to enter the virtual environment before running the python command if you install the prerequisite libraries through it.

Known issues

  • Google sometimes returns 500 errors.

Future work

As this is a proof of concept, I have no current plans for revisions, but I can think of a few things that I would do if I pursued them:

  • Make the interface nicer.
  • Add option to cancel in-progress LLM query.
  • Add support for more LLMs, and dynamic LLM switching.
  • Add support for modifying temperature, topP and topK.
  • Make an extensible JSON format rather than the naive one currently implemented, plus make a conversion tool for old saves.

gemini-chat's People

Contributors

ryao avatar

Stargazers

Sra Sontisirikit avatar

Watchers

 avatar  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.