Compare commits
22
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db9f63246 | ||
|
|
202c787f19 | ||
|
|
859c40c55c | ||
|
|
92dd043b35 | ||
|
|
761265a467 | ||
|
|
da1bfd4779 | ||
|
|
49167ee308 | ||
|
|
b9210910f5 | ||
|
|
040d90ce73 | ||
|
|
70c1dfdbb2 | ||
|
|
f5b370e048 | ||
|
|
678d7f4308 | ||
|
|
f3582e5881 | ||
|
|
74fb66d81e | ||
|
|
874df3c8c3 | ||
|
|
2280630149 | ||
|
|
9b440b775a | ||
|
|
1de70f3e48 | ||
|
|
8f50570084 | ||
|
|
57502673de | ||
|
|
aeb05e6df4 | ||
|
|
28595ead23 |
@@ -1,5 +1,8 @@
|
|||||||
name: Build and Push Image
|
name: Build and Push Image
|
||||||
on: [ push ]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -40,3 +43,19 @@ jobs:
|
|||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
tags: |
|
tags: |
|
||||||
git.aridgwayweb.com/armistace/blog:latest
|
git.aridgwayweb.com/armistace/blog:latest
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
echo "Installing Kubectl"
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y apt-transport-https ca-certificates curl gnupg
|
||||||
|
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.33/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||||
|
chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||||
|
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.33/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
|
||||||
|
chmod 644 /etc/apt/sources.list.d/kubernetes.list
|
||||||
|
apt-get update
|
||||||
|
apt-get install kubectl
|
||||||
|
kubectl delete namespace blog
|
||||||
|
kubectl create namespace blog
|
||||||
|
kubectl create secret docker-registry regcred --docker-server=${{ vars.DOCKER_SERVER }} --docker-username=${{ vars.DOCKER_USERNAME }} --docker-password='${{ secrets.DOCKER_PASSWORD }}' --docker-email=${{ vars.DOCKER_EMAIL }} --namespace=blog
|
||||||
|
kubectl apply -f kube/blog_pod.yaml && kubectl apply -f kube/blog_deployment.yaml && kubectl apply -f kube/blog_service.yaml
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: blog-deployment
|
||||||
|
labels:
|
||||||
|
app: blog
|
||||||
|
namespace: blog
|
||||||
|
spec:
|
||||||
|
replicas: 3
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: blog
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: blog
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: blog
|
||||||
|
image: git.aridgwayweb.com/armistace/blog:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 8000
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: blog
|
||||||
|
namespace: blog
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: blog
|
||||||
|
image: git.aridgwayweb.com/armistace/blog:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 8000
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: blog-service
|
||||||
|
namespace: blog
|
||||||
|
spec:
|
||||||
|
type: NodePort
|
||||||
|
selector:
|
||||||
|
app: blog
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
targetPort: 8000
|
||||||
|
nodePort: 30009
|
||||||
@@ -12,11 +12,11 @@ As mentioned in the last post I have been experimenting with AI content generati
|
|||||||
|
|
||||||
It's still not in the state I want it to be and isn't connecting to the actual blog repo yet (the idea being that I edit and change as part of a review process). But it is generating stuff that I thought would be worth a share just for fun. The eventual idea is the container will be something I trigger as part of a CI/CD process when the equipment is up and running but the final "production" implementation is still being fleshed out in my head (if you can call a homelab project "production")
|
It's still not in the state I want it to be and isn't connecting to the actual blog repo yet (the idea being that I edit and change as part of a review process). But it is generating stuff that I thought would be worth a share just for fun. The eventual idea is the container will be something I trigger as part of a CI/CD process when the equipment is up and running but the final "production" implementation is still being fleshed out in my head (if you can call a homelab project "production")
|
||||||
|
|
||||||
The focus to this point has been on prompt engineering and model selection. A big part of this is that it needs to be able to run completely indepdantly of any cloud services so no Chat GPT.
|
The focus to this point has been on prompt engineering and model selection. A big part of this is that it needs to be able to run completely independently of any cloud services so no Chat GPT.
|
||||||
|
|
||||||
The obvious solution is [ollama](https://ollama.com) I'm luck enough to have a modest secondary gaming rig in my living room with an nvidia 2060 in it that can act as a modest AI server so I have set it up there.
|
The obvious solution is [ollama](https://ollama.com) I'm lucky enough to have a modest secondary gaming rig in my living room with an nvidia 2060 in it that can act as a modest AI server so I have set it up there.
|
||||||
|
|
||||||
This server has allowed me to experiment almost at will with models. a few I tried included
|
This server has allowed me to experiment, almost at will, with models. a few I tried included
|
||||||
|
|
||||||
- llama3.2
|
- llama3.2
|
||||||
- zephyr
|
- zephyr
|
||||||
@@ -29,6 +29,7 @@ However I have found that mistral-nemo seems to be the strongest contender, at l
|
|||||||
You can see the code and what I have been working on for more details [HERE](https://git.aridgwayweb.com/armistace/blog_creator)
|
You can see the code and what I have been working on for more details [HERE](https://git.aridgwayweb.com/armistace/blog_creator)
|
||||||
|
|
||||||
#### The summary prompt used by mistral to generate this post
|
#### The summary prompt used by mistral to generate this post
|
||||||
|
|
||||||
_The following is what I have in trilium to generate the AI written content_
|
_The following is what I have in trilium to generate the AI written content_
|
||||||
|
|
||||||
Get a python file that can communicate with a local ollama instance
|
Get a python file that can communicate with a local ollama instance
|
||||||
@@ -50,7 +51,8 @@ Send a notification to matrix that there is a new PR in and give a summary of th
|
|||||||
_as you can see it pretty light on content so what it generates given this lack of context I feel is pretty good_
|
_as you can see it pretty light on content so what it generates given this lack of context I feel is pretty good_
|
||||||
|
|
||||||
# Let the post begin (begin...begin...begin...)
|
# Let the post begin (begin...begin...begin...)
|
||||||
_What follows is what it generated.. yes it is hilarious but well... it was to good not to share_
|
|
||||||
|
_What follows is what it generated.. yes it is hilarious but well... it was too good not to share_
|
||||||
|
|
||||||
# G'day, mates! Let's make an Ollama Blog Writer!
|
# G'day, mates! Let's make an Ollama Blog Writer!
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# Human Introduction
|
||||||
|
Well.. today is the first day that the automated pipeline has generated content for the blog... still a bit of work to do including
|
||||||
|
1. establishing a permanent vectordb solution (chromadb? pg_vector?)
|
||||||
|
2. Notification to Matrix that something has happened
|
||||||
|
3. Updating Trilium so that the note is marked as blog_written=true
|
||||||
|
|
||||||
|
BUT it can take a note from trilium, generate drafts with mulitple agents, and then use RAG to have an editor go over those drafts.
|
||||||
|
|
||||||
|
I'm particularly proud of the randomness I've applied to temperature, top_p and top_k for the different draft agents. This means that each pass is giving me quite different "creativity" (as much as that can be applied to an algorithm that is essentially munging letters together that have a high probability of being together) It has created some really interesting variation for the editor to work with and getting some really interesting results.
|
||||||
|
|
||||||
|
Anyways, without further ado, I present to you the first, pipeline written, AI content for this blog
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# When to use AI 😄
|
||||||
|
*A journalist, software developer, and DevOps expert’s take on when AI is overkill and when it’s just the right tool*
|
||||||
|
|
||||||
|
When I was building a spreadsheet called “shudders,” I was trying to figure out how to automate the process of mapping work types to work requests. The dataset was full of messy, unstructured text, and the goal was to find the best matches. At first, I thought, “This is a perfect use case for AI!” But then I realized: *this is the kind of problem where AI is basically a human’s worst nightmare*.
|
||||||
|
|
||||||
|
So, let’s break it down.
|
||||||
|
|
||||||
|
### 🧠 When AI is *not* the answer
|
||||||
|
|
||||||
|
AI is great at pattern recognition, but it’s not great at *understanding context*. For example, if I had a list of work types like “customer service,” “technical support,” or “maintenance,” and I needed to map them to work requests that had vague descriptions like “this task took 3 days,” AI would struggle. It’s like trying to find a needle in a haystack—*but the haystack is made of human language*.
|
||||||
|
|
||||||
|
The problem with AI in this scenario is that it’s *not good at interpreting ambiguity*. If the work types are vague, the AI might mislabel them, leading to errors. Plus, when the data is messy, AI can’t keep up. I remember one time I tried to use a chatbot to classify work requests. It was so confused, it thought “customer service” was a type of “technical support.” 😅 The result? A spreadsheet full of “unknown” entries.
|
||||||
|
|
||||||
|
### 🧮 When AI *is* the answer
|
||||||
|
|
||||||
|
There are some scenarios where AI is *definitely* the way to go. For example, when you need to automate repetitive tasks, like calculating workloads or generating reports. These tasks are math-heavy and don’t require creative thinking. Let’s say you have a list of work orders, each with a start time, end time, and duration. You want to calculate the average time per task. AI can do that with precision. It’s like a calculator, but with a personality.
|
||||||
|
|
||||||
|
Another example: if you need to generate a report that summarizes key metrics, AI can handle that. It’s not about creativity, it’s about logic. And that’s where traditional programming shines.
|
||||||
|
|
||||||
|
### 🧪 The balance between AI and human oversight
|
||||||
|
|
||||||
|
AI is a tool, not a replacement for human judgment. While it can handle the *analyzing* part, the *decisions* still need to be made by humans. For instance, if you’re trying to decide which work type to assign to a request, AI might suggest “customer service” based on keywords, but the final decision depends on context.
|
||||||
|
|
||||||
|
So, in the end, AI is a *helper*, not a *replacement*. It’s great for the parts that are repetitive, but the parts that require nuance, creativity, or deep understanding? That’s where humans step in.
|
||||||
|
|
||||||
|
### 🧩 Final thoughts
|
||||||
|
|
||||||
|
AI is like a superpower—great at certain things, not so great at others. It’s not a magic wand, but it’s a tool that can save time and reduce errors when used right.
|
||||||
|
|
||||||
|
So, when is it time to say “AI, nope”? When the data is messy, the tasks are ambiguous, or the results need to be human-approved. And when is it time to say “AI, yes”? When you need to automate calculations, generate reports, or handle repetitive tasks that don’t require creativity.
|
||||||
|
|
||||||
|
### 🧩 Summary
|
||||||
|
|
||||||
|
| Scenario | AI? | Reason |
|
||||||
|
|---|---|---|
|
||||||
|
| Ambiguous data | ❌ | AI struggles with context |
|
||||||
|
| Repetitive tasks | ✅ | AI handles math and logic |
|
||||||
|
| Creative decisions | ❌ | AI lacks the ability to think creatively |
|
||||||
|
|
||||||
|
In the end, AI is just another tool. Use it when it works, and don’t let it define your workflow. 😄 *And if you ever feel like AI is overstepping, remember: it’s just trying to be helpful. Sometimes it’s not the best choice. Sometimes it’s the only choice.*
|
||||||
Reference in New Issue
Block a user