____.
| |___.__. ____ ___ ___
| < | |/ \\ \/ /
/\__| |\___ | | \> <
\________|/_____|___|__/__/\__\
This is a command-line tool for generating text using generative AI. It leverages the power of Gemini 1.5 pro, a versatile language model trained by Google, to create natural language text. It uses a JSON file to keep track of the last 50 prompts and responses using a simple FIFO (First In First Out) technique, specifically a queue data structure to keep track of context while keeping the valuable token limit under control while conversing.
- Text Generation: Generate creative and coherent text based on prompts.
- Usage of chat history: Implementation of soft training data using chat history.
- Context Awareness of last 50 conversations: Adjust parameters like temperature and max length for varied output.
- CLI Interface: Easy-to-use command-line interface for quick and dynamic text generation with animation.
-
Install Python (if not already installed).
-
Clone this repository:
git clone https://github.com/ImonChakraborty/jynx-gemini-context-CLI.git
-
Install dependencies:
pip install -r requirements.txt
-
Get your API key: Go to https://aistudio.google.com/app/apikey and generate your api key.
-
Change the Location of the history JSON File:
-
Open terminal:
notepad $PROFILE
if it is not available, refer to this video: https://youtu.be/E5tMwtoTd30?si=U7kVp21rw834Omqs
-
Paste this on $PROFILE:
function jynx {python.exe "D:\programming\Python\TextGenAi.py" $args}
-
Save the powershell profile config and now you can use it on terminal itself:
-
Open terminal / Konsole / Kitty / Alacritty / whatever you use
-
If you use bash:
nano .bashrc
-
If you use zsh:
nano .zshrc
-
Write:
alias jynx="python Documents/TextGenAi.py"
- This project is licensed under the MIT License. See the LICENSE file for details.