GoGenAI-Terminal-Chat
Note: This repository is a work in progress (WIP).
Estimated Time of Arrival (ETA): Unknown. This project is developed on a personal basis during my free time and is not associated with any company or enterprise endeavors.
Why Continue Development?
Interesting to built it in terminal after touring journey through the Go programming language, plus exploring Google's AI capabilities (currently in beta with Gemini).
Current Features
- Terminal-Based Interaction: Experience AI chatting within the comfort of your terminal, with a focus on simplicity and efficiency.
- Session Chat History: Maintain a transcript of your dialogue, capturing both queries and AI responses for a continuous conversational flow.
- Intelligent Shutdown: Benefit from built-in signal handling for a smooth exit process, ensuring your session ends without disruption and with proper resource cleanup.
- Realistic Typing Animation: Enjoy a more lifelike interaction with a simulated typing effect that mimics human conversation timing.
- Ease of Deployment: Quickly deploy the chat application using Docker, minimizing setup time and complexity.
[!NOTE]
Subject planning to continuously improve and add features, enhancing functionality without adding unnecessary complexity. Stay tuned for updates!
Go
is designed to be straightforward and efficient, avoiding the unnecessary complexities (fuck complexities, this is go
anti complexities) often encountered in other programming languages.
Installation
To use GoGenAI Terminal Chat, you need to have Docker installed on your machine. If you don't have Docker installed, please follow the official Docker installation guide.
Once Docker is set up, you can pull the image from GitHub Packages by running:
docker pull ghcr.io/h0llyw00dzz/gogenai-terminal-chat:latest
Usage
To start a chat session with GoGenAI, run the following command in your terminal. Make sure to replace YOUR_API_KEY
with the actual API key provided to you.
docker run -it --rm --name mychatapp -e API_KEY=YOUR_API_KEY ghcr.io/h0llyw00dzz/gogenai-terminal-chat:latest
This command will start the GoGenAI Terminal Chat application in interactive mode. You will be able to type your messages and receive responses from the AI.
Environment Variables
API_KEY
: Your API key for accessing the generative AI model. This is a required environment variable.
Example how it wok
🤓 You: hello are you ?
🤖 AI: : I am a large language model, trained by Google.
🤓 You: I have question about k8s, How do I enable audit logging in Kubernetes, and what should I look for when analyzing the logs?
🤖 AI: To enable audit logging in Kubernetes, you can use the following steps:
- Edit the Kubernetes API server configuration file, typically located at
/etc/kubernetes/manifests/kube-apiserver.yaml
.
- Add the following configuration under the
audit-policy
section:
enabled: true
-
Optionally, you can configure the following settings:
policyFile
: The path to a file containing the audit policy rules.
logPath
: The path to the file where the audit logs will be stored.
logFormat
: The format of the audit logs.
maxBatchSize
: The maximum number of audit events to include in a single batch.
maxBatchWait
: The maximum amount of time to wait for a batch of audit events to be filled before writing them to disk.
-
Save and restart the Kubernetes API server.
Once audit logging is enabled, you can analyze the logs to gain insights into the activity on your Kubernetes cluster. Some things you may want to look for include:
- Successful and failed authentication and authorization attempts
- Create, update, and delete operations on Kubernetes resources
- Changes to cluster configuration
- API calls that take a long time to complete
- Errors and warnings generated by the Kubernetes API server
By analyzing the audit logs, you can identify security risks, troubleshoot issues, and gain a better understanding of how your Kubernetes cluster is being used.
Here are some additional resources that you may find helpful: