Skip to content

Commit

Permalink
add bi
Browse files Browse the repository at this point in the history
  • Loading branch information
nold committed Jun 30, 2024
1 parent 2b56812 commit ff958a9
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 31 deletions.
24 changes: 0 additions & 24 deletions projects/ai/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,3 @@ apps:
repo: bjw-s
chart: app-template
targetRevision: 2.4.0

# - name: qdrant
# repoURL: https://qdrant.to/helm
# chart: qdrant
# targetRevision: 0.9.1

- name: bibot
namespace: bibot
repo: bjw-s
chart: app-template
targetRevision: 3.2.1
secrets:
- name: bibot
keys:
- discord-token
- ombi-api-key
- prompt-template
- instruct-template
- OPENWEATHERMAP_API_KEY
ignoreDiff:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas
14 changes: 7 additions & 7 deletions projects/bi/manifests/kafka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: Kafka
metadata:
name: bi-cluster
namespace: bibot
namespace: bi
spec:
kafka:
version: 3.7.0
Expand Down Expand Up @@ -44,7 +44,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: bi-input
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
Expand All @@ -58,7 +58,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: bi-output
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
Expand All @@ -72,11 +72,11 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: agent-registry
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
partitions: 1
partitions: 24
replicas: 1
config:
retention.ms: 7200000
Expand All @@ -86,7 +86,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: agent-main-input
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
Expand All @@ -100,7 +100,7 @@ apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaTopic
metadata:
name: discord-input
namespace: bibot
namespace: bi
labels:
strimzi.io/cluster: bi-cluster
spec:
Expand Down
22 changes: 22 additions & 0 deletions projects/bi/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
config:
description: Bi Agent Framework

apps:
- name: bi
namespace: bi
repo: bjw-s
chart: app-template
targetRevision: 3.2.1
secrets:
- name: bibot
keys:
- discord-token
- ombi-api-key
- prompt-template
- instruct-template
- OPENWEATHERMAP_API_KEY
ignoreDiff:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas
84 changes: 84 additions & 0 deletions projects/bi/values/bi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
controllers:
# main agent
main:
containers:
main:
image:
repository: reg.dc/bi
tag: latest
pullPolicy: Always
env:
BIBOT_CONFIG: /config/bibot.yml
BIBOT_KAFKA__BROKER: kafka://bi-cluster-kafka-bootstrap:9092
PHOENIX_COLLECTOR_ENDPOINT: http://phoenix.phoenix.svc.cluster.local:6006
PHOENIX_PROJECT_NAME: bi
command: ["python3"]
args: ["/app/bi/agents/main/app.py", "worker", "-l", "info"]

controller:
containers:
main:
image:
repository: reg.dc/bi
tag: latest
pullPolicy: Always
env:
BIBOT_CONFIG: /config/bibot.yml
BIBOT_KAFKA__BROKER: kafka://bi-cluster-kafka-bootstrap:9092
command: ["python3"]
args: ["/app/bi/controller.py", "worker", "-l", "info"]

discord:
containers:
main:
image:
repository: reg.dc/bi
tag: latest
pullPolicy: Always

command: ["python3"]
args: ["/app/bi/connectors/discord/app.py", "worker", "-l", "info"]

env:
BIBOT_KAFKA__BROKER: bi-cluster-kafka-bootstrap:9092
OPENAI_API_KEY: fake
BIBOT_DISCORD__TOKEN:
valueFrom:
secretKeyRef:
name: bibot
key: discord-token
## Prod:
BIBOT_DISCORD__CHANNELS: "1216440541064200192"
# Dev:
# BIBOT_DISCORD_CHANNELS: "1217418069693960223"
probes:
liveness:
enabled: false
readiness:
enabled: false
startup:
enabled: false

persistence:
secret:
name: bibot
enabled: true
type: secret

config:
name: bibot-config
enabled: true
type: configMap

data:
size: 10Gi
type: persistentVolumeClaim
accessMode: ReadWriteOnce

# service:
# main:
# controller: main
# ports:
# http:
# port: 8000
# type: ClusterIP

0 comments on commit ff958a9

Please sign in to comment.