Create and manage task specific GPT AI agents through text-based prompt templates.
Interact with OpenAI's GPT models from your CLI using prompt-based agents. Simply drop your text files with GPT prompts into the templates
folder to create your customized chat agents. Use langchain to enhance it further.
Clone the repository:
git clone https://github.com/steffenbew/siegfried-ai.git
Navigate to the project directory and install dependencies:
cd siegfried-ai
npm install
Set your OpenAI API key as an environment variable:
export OPENAI_API_KEY=your_openai_api_key_here
Your API key can be found here.
Run the chat interface:
npm start
Follow the on-screen prompts to select a template and start chatting!
To provide multiline input, open the editor by submitting an empty input.
To return to the template selection, type exit
.
Note
Context-aware sessions: The history of your chat session is sent back to OpenAI with every request. This ensures that the agent remains context-aware throughout the conversation to provide coherent responses.
When you exit a chat session, the history is dismissed. Each new session starts with a fresh interaction.
Manage your chat agents in the templates
directory:
templates/
βββ Customer Support.txt
βββ Developer.txt
βββ Final Cut Pro.txt
βββ Flynt Component.txt
βββ Meeting Notes.txt
βββ Titles.txt
Create a new chat agent by adding a text file with a prompt. The file name will be displayed in the selection.
- Create a file named
Code Documentation.txt
in thetemplates
directory with the following content:
Extend provided code with comments. Use clear and concise language.
- Start the script, and select the template
Code Documentation
. - Open the editor, paste a code snippet, and the agent will generate code comments for your code.
Make the script available in any directory, by setting an alias in your .bashrc
or .zshrc
:
alias siegfried='(cd ~/your/path/siegfried-ai/ && npm start)'
The default editor can be changed via an environment variable:
export EDITOR="code -w"
For more information see Inquiry.js#Editor.
To contribute, please use GitHub Issues and PRs.
MIT Β© 2023 Steffen Bewersdorff