Skip to content

Commit

Permalink
Refactor Docker config to override default configuration
Browse files Browse the repository at this point in the history
Add default `claude` bot to default config
Init logging to ensure config is handled consistently
Update service for async consumers
  • Loading branch information
NeonDaniel committed Jan 17, 2025
1 parent a69daa5 commit 6611b4c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ FROM python:3.9-slim
LABEL vendor=neon.ai \
ai.neon.name="neon-llm-claude"

ENV OVOS_CONFIG_BASE_FOLDER neon
ENV OVOS_CONFIG_FILENAME diana.yaml
ENV XDG_CONFIG_HOME /config
ENV OVOS_CONFIG_BASE_FOLDER=neon
ENV OVOS_CONFIG_FILENAME=diana.yaml
ENV OVOS_DEFAULT_CONFIG=/opt/neon/diana.yaml
ENV XDG_CONFIG_HOME=/config
ENV CHATBOT_VERSION=v2

COPY docker_overlay/ /

WORKDIR /app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ logs:
- pika
warning:
- filelock
info: []
- watchdog
- httpcore
info:
- openai
- asyncio
- matplotlib
debug: []
MQ:
server: api.neon.ai
server: neon-rabbitmq
port: 5672
users:
mq_handler:
Expand All @@ -19,4 +24,8 @@ LLM_CLAUDE:
role: "You are trying to give a short answer in less than 40 words."
context_depth: 3
max_tokens: 100
num_parallel_processes: 2
num_parallel_processes: 2
llm_bots:
claude:
- description: You are trying to give a short answer in less than 40 words.
name: claude
9 changes: 5 additions & 4 deletions neon_llm_claude/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,15 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from neon_llm_claude.rmq import ClaudeMQ
from neon_utils.log_utils import init_log


def main():
init_log(log_name="claude")
# Run RabbitMQ
claudeMQ = ClaudeMQ()
claudeMQ.run(run_sync=False, run_consumers=True,
daemonize_consumers=True)
claudeMQ.observer_thread.join()
claude_mq_service = ClaudeMQ()
claude_mq_service.run(run_sync=False, run_consumers=True,
daemonize_consumers=True)


if __name__ == "__main__":
Expand Down

0 comments on commit 6611b4c

Please # to comment.