logging and healthchecks

This commit is contained in:
mudler
2023-07-30 18:35:30 +02:00
parent c8e76fa6e3
commit c192567842
2 changed files with 8 additions and 1 deletions

View File

@@ -2,6 +2,11 @@ version: "3.9"
services: services:
api: api:
image: quay.io/go-skynet/local-ai:master image: quay.io/go-skynet/local-ai:master
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/readyz"]
interval: 1m
timeout: 120m
retries: 120
ports: ports:
- 8090:8080 - 8090:8080
env_file: env_file:

View File

@@ -9,7 +9,6 @@ from ascii_magic import AsciiArt
from duckduckgo_search import DDGS from duckduckgo_search import DDGS
from typing import Dict, List, Optional from typing import Dict, List, Optional
logger.add(sys.stderr, format="{time} {level} {message}", filter="miniAGI", level="INFO")
# these three lines swap the stdlib sqlite3 lib with the pysqlite3 package for chroma # these three lines swap the stdlib sqlite3 lib with the pysqlite3 package for chroma
__import__('pysqlite3') __import__('pysqlite3')
import sys import sys
@@ -568,6 +567,9 @@ agent_actions = {
conversation_history = [] conversation_history = []
logger.info("Welcome to miniAGI")
logger.info("Creating avatar, please wait...")
display_avatar() display_avatar()
# TODO: process functions also considering the conversation history? conversation history + input # TODO: process functions also considering the conversation history? conversation history + input