From 49e501c256addb6d55f0e24103c5b695d5bcc748 Mon Sep 17 00:00:00 2001 From: nold Date: Tue, 9 Jul 2024 20:52:55 +0200 Subject: [PATCH] feat(bi): researcher --- projects/bi/manifests/kafka.yml | 28 +++++++++++++++++++++++++++ projects/bi/values/bi.yml | 34 ++++++++++++++++++++++++++++++++- 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/projects/bi/manifests/kafka.yml b/projects/bi/manifests/kafka.yml index eee130fc..92913042 100644 --- a/projects/bi/manifests/kafka.yml +++ b/projects/bi/manifests/kafka.yml @@ -109,3 +109,31 @@ spec: config: retention.ms: 7200000 segment.bytes: 1073741824 +--- +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: agent-researcher-input + namespace: bi + labels: + strimzi.io/cluster: bi-cluster +spec: + partitions: 1 + replicas: 1 + config: + retention.ms: 7200000 + segment.bytes: 1073741824 +--- +apiVersion: kafka.strimzi.io/v1beta2 +kind: KafkaTopic +metadata: + name: agent-researcher-config + namespace: bi + labels: + strimzi.io/cluster: bi-cluster +spec: + partitions: 1 + replicas: 1 + config: + retention.ms: 7200000 + segment.bytes: 1073741824 diff --git a/projects/bi/values/bi.yml b/projects/bi/values/bi.yml index 3ef63acf..db6f1b2b 100644 --- a/projects/bi/values/bi.yml +++ b/projects/bi/values/bi.yml @@ -74,7 +74,6 @@ controllers: secretKeyRef: name: bi-mongo-bi-bi key: password - OPENAI_API_KEY: fake BIBOT_DISCORD__TOKEN: valueFrom: @@ -94,6 +93,39 @@ controllers: startup: enabled: false + researcher: + containers: + main: + image: + repository: reg.dc/bi + tag: latest + pullPolicy: Always + env: + BIBOT_CONFIG: /config/bibot.yml + BIBOT_OPENAI__TEMPERATURE: "0.0" + BIBOT_KAFKA__BROKER: kafka://bi-cluster-kafka-bootstrap:9092 + BIBOT_MONGODB__URI: mongodb://bi-mongo-svc:27017/ + BIBOT_MONGODB__USER: + valueFrom: + secretKeyRef: + name: bi-mongo-bi-bi + key: username + BIBOT_MONGODB__PASSWORD: + valueFrom: + secretKeyRef: + name: bi-mongo-bi-bi + key: password + OPENWEATHERMAP_API_KEY: + valueFrom: + secretKeyRef: + name: bibot + key: OPENWEATHERMAP_API_KEY + PHOENIX_COLLECTOR_ENDPOINT: http://phoenix.phoenix.svc.cluster.local:6006 + PHOENIX_PROJECT_NAME: bi + command: ["python3"] + args: ["/app/bi/agents/researcher/app.py", "worker", "-l", "info"] + + persistence: secret: name: bibot