terminal-assistant
terminal-assistant copied to clipboard
By this point in time, if you're aren't making your own AI assistant. What are you doing? Use this as a template to build on. All the code is just a suggestion. Use other AI models to build it for you...
Anthropic API for language model interaction
- LM-Studio: Download, Configure and Serve LLMs
How to Use
- Clone the repository to your local machine.
- Install the required dependencies.
- Get https://lmstudio.ai/ -> Click Linux link to join discord -> Give Yourself Linux Beta Role -> Check Pinned Messages in Linux Beta Channel to get the link to the appimage. This will be the server for the assistant.
git clone https://github.com/webmaster-exit-1/terminal-assistant
cd terminal-assistant
conda env create -f environment.yml -n terminal_assistant
conda activate terminal_assistant
python terminal_assistant.py
Customization
- Open the terminal-assistant.py file in your preferred text editor.
- Make any modifications you desire.
Google Search
To enable the custom Google search feature, you need to obtain a Google API key and a custom search engine ID. Follow these steps to set it up:
- Sign up for a Google API key at the Google Developers Console.
- Create a new project and enable the "Custom Search JSON API" for the project.
- Generate an API key for the project.
- Get your Google Search Engine ID here: Programmable Search Engine
- Add your
GOOGLE_API_KEY
when prompted by the script. - Add your
SEARCH_ENGINE_ID
when prompted by the script.
Language Model
This updated version now uses Anthropic's API for language model interaction instead of OpenAI's API base.
Usage
Run LM-Studio Beta Linux appimage
(From the "How to use" #3 section)
- Download model, open the server section via left side tab, load model and start server.
- The server will be waiting for terminal_assistant to be started.
Run the terminal-assistant.py
file using the python command.
-
Press 'Enter' (With text)
To respond via text -
Press 'Enter' (**Without** text)
To respond by voice -
Type '!search'
to use Google search
Example:
!search cats
- To exit the chatbot, type
quit
orCtrl+c
.
Disclaimer
Terminal Assistant is a personal A.I. assistant and is not intended to replace human interaction or professional advice. Use it at your own risk.