Skip to content

Commit

Permalink
Update docker config to include default assistant persona and updat…
Browse files Browse the repository at this point in the history
…e logging config

Initialize log and prevent joining thread for async consumer support
Update Dockerfile to set default config path
  • Loading branch information
NeonDaniel committed Jan 17, 2025
1 parent dd777cf commit 8f748b7
Show file tree
Hide file tree
Showing 3 changed files with 24 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-gemini"

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_GEMINI:
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:
gemini:
- description: You are trying to give a short answer in less than 40 words.
name: assistant
10 changes: 6 additions & 4 deletions neon_llm_gemini/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from neon_llm_gemini.rmq import GeminiMQ
from neon_utils.log_utils import init_log


def main():
init_log(log_name="gemini")

# Run RabbitMQ
geminiMQ = GeminiMQ()
geminiMQ.run(run_sync=False, run_consumers=True,
daemonize_consumers=True)
geminiMQ.observer_thread.join()
gemini_mq_service = GeminiMQ()
gemini_mq_service.run(run_sync=False, run_consumers=True,
daemonize_consumers=True)


if __name__ == "__main__":
Expand Down

0 comments on commit 8f748b7

Please sign in to comment.