generate working schema
This commit is contained in:
parent
7979061a36
commit
36bd3b32a6
|
|
@ -1,6 +0,0 @@
|
||||||
MODEL_NAME=gpt-4-turbo-preview
|
|
||||||
|
|
||||||
OPENAI_API_KEY=sk-xxxx..
|
|
||||||
LANGFUSE_PUBLIC_KEY=pk-lf-...
|
|
||||||
LANGFUSE_SECRET_KEY=sk-lf-...
|
|
||||||
LANGFUSE_HOST=http://brunix-observability:3000
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
FROM python:3.11-slim
|
|
||||||
|
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
||||||
build-essential \
|
|
||||||
curl \
|
|
||||||
protobuf-compiler \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN pip install --no-cache-dir --upgrade pip
|
|
||||||
|
|
||||||
RUN pip install --no-cache-dir \
|
|
||||||
langchain==0.1.0 \
|
|
||||||
langchain-community==0.0.10 \
|
|
||||||
langchain-elasticsearch \
|
|
||||||
grpcio \
|
|
||||||
grpcio-tools \
|
|
||||||
grpcio-reflection \
|
|
||||||
pydantic
|
|
||||||
|
|
||||||
COPY ./protos ./protos
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
RUN python -m grpc_tools.protoc \
|
|
||||||
--proto_path=./protos \
|
|
||||||
--python_out=./src \
|
|
||||||
--grpc_python_out=./src \
|
|
||||||
./protos/brunix.proto
|
|
||||||
|
|
||||||
EXPOSE 50051
|
|
||||||
|
|
||||||
CMD ["python", "src/server.py"]
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
ELASTICSEARCH_URL=http://host.docker.internal:9200
|
|
||||||
DATABASE_URL=postgresql://postgres:brunix_pass@host.docker.internal:5432/postgres
|
|
||||||
|
|
||||||
LANGFUSE_HOST=http://45.77.119.180
|
|
||||||
LANGFUSE_PUBLIC_KEY=pk-lf-0e6db694-3e95-4dd4-aedf-5a2694267058
|
|
||||||
LANGFUSE_SECRET_KEY=sk-lf-dbf28bb9-15bb-4d03-a8c3-05caa3e3905f
|
|
||||||
LLM_BASE_URL=http://host.docker.internal:11434
|
|
||||||
OPENAI_API_KEY=MTswYuNlhhRLLw7EGSAz_ID9qeELinoB9x4zF8qVyQo4T3BlbkFJvS3HrA3Rqr0CtlET442uQ1nEiJtWD
|
|
||||||
|
|
@ -1,30 +1,26 @@
|
||||||
{
|
{
|
||||||
"name": "brunix-assistance-engine",
|
"name": "brunix-assistance-engine",
|
||||||
"build": {
|
"dockerComposeFile": "../docker-compose.yaml",
|
||||||
"dockerfile": "Dockerfile",
|
"service": "brunix-engine",
|
||||||
"dockerComposeFile": "docker-compose.yaml",
|
"workspaceFolder": "/workspace",
|
||||||
"context": "../"
|
"remoteUser": "root",
|
||||||
},
|
|
||||||
"runArgs": [
|
"runArgs": [
|
||||||
"-p",
|
|
||||||
"50052:50051",
|
|
||||||
"--env-file",
|
|
||||||
".devcontainer/devcontainer.env",
|
|
||||||
"--add-host",
|
"--add-host",
|
||||||
"host.docker.internal:host-gateway"
|
"host.docker.internal:host-gateway"
|
||||||
],
|
],
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"quarto.quarto",
|
|
||||||
"ms-azuretools.vscode-docker",
|
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
"ms-vscode-remote.remote-containers",
|
"ms-python.vscode-pylance",
|
||||||
"yzhang.markdown-all-in-one",
|
"ms-python.debugpy",
|
||||||
"redhat.vscode-yaml",
|
"astral-sh.ruff",
|
||||||
"ms-toolsai.jupyter",
|
"ms-python.black-formatter",
|
||||||
"hediet.vscode-drawio"
|
"njpwerner.autodocstring"
|
||||||
]
|
],
|
||||||
|
"settings": {
|
||||||
|
"python.defaultInterpreterPath": "/usr/local/bin/python"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
# Documentation
|
||||||
|
*.md
|
||||||
|
documentation/
|
||||||
|
|
||||||
|
# Build and dependency files
|
||||||
|
Makefile
|
||||||
|
*.pyc
|
||||||
|
__pycache__/
|
||||||
|
*.egg-info/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Development and testing
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
.pytest_cache/
|
||||||
|
.coverage
|
||||||
|
|
||||||
|
# Git and version control
|
||||||
|
.git/
|
||||||
|
.gitignore
|
||||||
|
.gitattributes
|
||||||
|
|
||||||
|
# IDE and editor files
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# Environment files
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Docker files (no copy Docker files into the image)
|
||||||
|
Dockerfile
|
||||||
|
docker-compose.yaml
|
||||||
|
|
||||||
|
# CI/CD
|
||||||
|
.github/
|
||||||
|
.gitlab-ci.yml
|
||||||
|
|
||||||
|
# Temporary files
|
||||||
|
*.tmp
|
||||||
|
*.log
|
||||||
|
scratches/
|
||||||
|
|
||||||
|
# Node modules (if any)
|
||||||
|
node_modules/
|
||||||
|
npm-debug.log
|
||||||
|
|
@ -3,6 +3,7 @@ FROM python:3.11-slim
|
||||||
ENV PYTHONDONTWRITEBYTECODE=1
|
ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY ./requirements.txt .
|
COPY ./requirements.txt .
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
.PHONY: help requirements docker-build docker-up docker-down clean start tunnels_up
|
||||||
|
|
||||||
|
help:
|
||||||
|
@echo "Available commands:"
|
||||||
|
@echo " make sync_requirements - Export dependencies from pyproject.toml to requirements.txt"
|
||||||
|
@echo " make tunnels_up - Start tunnels"
|
||||||
|
@echo " make compose_up - Run tunnels script and start Docker Compose"
|
||||||
|
|
||||||
|
sync_requirements:
|
||||||
|
@echo "Exporting dependencies from pyproject.toml to requirements.txt..."
|
||||||
|
uv export --format requirements-txt --no-hashes --no-dev -o requirements.txt
|
||||||
|
@echo "✓ requirements.txt updated successfully"
|
||||||
|
|
||||||
|
tunnels_up:
|
||||||
|
bash ./scripts/start-tunnels.sh < /dev/null &
|
||||||
|
@echo "✓ Tunnels started!"
|
||||||
|
|
||||||
|
compose_up:
|
||||||
|
bash ./scripts/start-tunnels.sh < /dev/null &
|
||||||
|
sleep 2
|
||||||
|
docker compose up -d --build
|
||||||
|
@echo "✓ Done!"
|
||||||
|
|
@ -4,6 +4,9 @@ services:
|
||||||
brunix-engine:
|
brunix-engine:
|
||||||
build: .
|
build: .
|
||||||
container_name: brunix-assistance-engine
|
container_name: brunix-assistance-engine
|
||||||
|
volumes:
|
||||||
|
- .:/workspace
|
||||||
|
env_file: .env
|
||||||
ports:
|
ports:
|
||||||
- "50052:50051"
|
- "50052:50051"
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"grpcio>=1.78.0",
|
"grpcio>=1.78.0",
|
||||||
|
"grpcio-reflection>=1.78.0",
|
||||||
"grpcio-tools>=1.78.0",
|
"grpcio-tools>=1.78.0",
|
||||||
"langchain>=1.2.10",
|
"langchain>=1.2.10",
|
||||||
"langchain-community>=0.4.1",
|
"langchain-community>=0.4.1",
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,10 @@ certifi==2026.1.4
|
||||||
# requests
|
# requests
|
||||||
charset-normalizer==3.4.4
|
charset-normalizer==3.4.4
|
||||||
# via requests
|
# via requests
|
||||||
|
colorama==0.4.6 ; sys_platform == 'win32'
|
||||||
|
# via
|
||||||
|
# loguru
|
||||||
|
# tqdm
|
||||||
dataclasses-json==0.6.7
|
dataclasses-json==0.6.7
|
||||||
# via langchain-community
|
# via langchain-community
|
||||||
elastic-transport==8.17.1
|
elastic-transport==8.17.1
|
||||||
|
|
@ -67,7 +71,7 @@ langchain-classic==1.0.1
|
||||||
# via langchain-community
|
# via langchain-community
|
||||||
langchain-community==0.4.1
|
langchain-community==0.4.1
|
||||||
# via assistance-engine
|
# via assistance-engine
|
||||||
langchain-core==1.2.12
|
langchain-core==1.2.11
|
||||||
# via
|
# via
|
||||||
# langchain
|
# langchain
|
||||||
# langchain-classic
|
# langchain-classic
|
||||||
|
|
@ -96,6 +100,8 @@ langsmith==0.7.1
|
||||||
# langchain-classic
|
# langchain-classic
|
||||||
# langchain-community
|
# langchain-community
|
||||||
# langchain-core
|
# langchain-core
|
||||||
|
loguru==0.7.3
|
||||||
|
# via assistance-engine
|
||||||
marshmallow==3.26.2
|
marshmallow==3.26.2
|
||||||
# via dataclasses-json
|
# via dataclasses-json
|
||||||
multidict==6.7.1
|
multidict==6.7.1
|
||||||
|
|
@ -106,8 +112,10 @@ mypy-extensions==1.1.0
|
||||||
# via typing-inspect
|
# via typing-inspect
|
||||||
numpy==2.4.2
|
numpy==2.4.2
|
||||||
# via
|
# via
|
||||||
|
# assistance-engine
|
||||||
# elasticsearch
|
# elasticsearch
|
||||||
# langchain-community
|
# langchain-community
|
||||||
|
# pandas
|
||||||
orjson==3.11.7
|
orjson==3.11.7
|
||||||
# via
|
# via
|
||||||
# langgraph-sdk
|
# langgraph-sdk
|
||||||
|
|
@ -119,6 +127,8 @@ packaging==26.0
|
||||||
# langchain-core
|
# langchain-core
|
||||||
# langsmith
|
# langsmith
|
||||||
# marshmallow
|
# marshmallow
|
||||||
|
pandas==3.0.0
|
||||||
|
# via assistance-engine
|
||||||
propcache==0.4.1
|
propcache==0.4.1
|
||||||
# via
|
# via
|
||||||
# aiohttp
|
# aiohttp
|
||||||
|
|
@ -129,7 +139,6 @@ protobuf==6.33.5
|
||||||
# grpcio-tools
|
# grpcio-tools
|
||||||
pydantic==2.12.5
|
pydantic==2.12.5
|
||||||
# via
|
# via
|
||||||
# assistance-engine
|
|
||||||
# langchain
|
# langchain
|
||||||
# langchain-classic
|
# langchain-classic
|
||||||
# langchain-core
|
# langchain-core
|
||||||
|
|
@ -141,9 +150,13 @@ pydantic-core==2.41.5
|
||||||
pydantic-settings==2.12.0
|
pydantic-settings==2.12.0
|
||||||
# via langchain-community
|
# via langchain-community
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
# via elasticsearch
|
# via
|
||||||
|
# elasticsearch
|
||||||
|
# pandas
|
||||||
python-dotenv==1.2.1
|
python-dotenv==1.2.1
|
||||||
# via pydantic-settings
|
# via
|
||||||
|
# assistance-engine
|
||||||
|
# pydantic-settings
|
||||||
pyyaml==6.0.3
|
pyyaml==6.0.3
|
||||||
# via
|
# via
|
||||||
# langchain-classic
|
# langchain-classic
|
||||||
|
|
@ -171,6 +184,8 @@ tenacity==9.1.4
|
||||||
# via
|
# via
|
||||||
# langchain-community
|
# langchain-community
|
||||||
# langchain-core
|
# langchain-core
|
||||||
|
tqdm==4.67.3
|
||||||
|
# via assistance-engine
|
||||||
typing-extensions==4.15.0
|
typing-extensions==4.15.0
|
||||||
# via
|
# via
|
||||||
# aiosignal
|
# aiosignal
|
||||||
|
|
@ -189,6 +204,8 @@ typing-inspection==0.4.2
|
||||||
# via
|
# via
|
||||||
# pydantic
|
# pydantic
|
||||||
# pydantic-settings
|
# pydantic-settings
|
||||||
|
tzdata==2025.3 ; sys_platform == 'emscripten' or sys_platform == 'win32'
|
||||||
|
# via pandas
|
||||||
urllib3==2.6.3
|
urllib3==2.6.3
|
||||||
# via
|
# via
|
||||||
# elastic-transport
|
# elastic-transport
|
||||||
|
|
@ -197,6 +214,8 @@ uuid-utils==0.14.0
|
||||||
# via
|
# via
|
||||||
# langchain-core
|
# langchain-core
|
||||||
# langsmith
|
# langsmith
|
||||||
|
win32-setctime==1.2.0 ; sys_platform == 'win32'
|
||||||
|
# via loguru
|
||||||
xxhash==3.6.0
|
xxhash==3.6.0
|
||||||
# via
|
# via
|
||||||
# langgraph
|
# langgraph
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
from langchain_elasticsearch import ElasticsearchStore
|
||||||
|
print("Hello world")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3,8 +3,6 @@
|
||||||
# Start Infrastructure Tunnels for Brunix Assistance Engine
|
# Start Infrastructure Tunnels for Brunix Assistance Engine
|
||||||
# Connects to the Devaron Cluster in Vultr Cloud
|
# Connects to the Devaron Cluster in Vultr Cloud
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
KUBECONFIG_PATH="$PROJECT_ROOT/$(grep KUBECONFIG_PATH "$PROJECT_ROOT/.env" | cut -d '=' -f2)"
|
KUBECONFIG_PATH="$PROJECT_ROOT/$(grep KUBECONFIG_PATH "$PROJECT_ROOT/.env" | cut -d '=' -f2)"
|
||||||
|
|
@ -49,7 +47,3 @@ echo ""
|
||||||
echo "To stop all tunnels, run:"
|
echo "To stop all tunnels, run:"
|
||||||
echo " kill $OLLAMA_PID $ES_PID $PG_PID"
|
echo " kill $OLLAMA_PID $ES_PID $PG_PID"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Press Ctrl+C to stop all tunnels and exit..."
|
|
||||||
|
|
||||||
# Wait for all background processes
|
|
||||||
wait
|
|
||||||
|
|
|
||||||
17
uv.lock
17
uv.lock
|
|
@ -1,5 +1,5 @@
|
||||||
version = 1
|
version = 1
|
||||||
revision = 3
|
revision = 2
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
resolution-markers = [
|
resolution-markers = [
|
||||||
"python_full_version >= '3.14' and sys_platform == 'win32'",
|
"python_full_version >= '3.14' and sys_platform == 'win32'",
|
||||||
|
|
@ -165,6 +165,7 @@ version = "0.1.0"
|
||||||
source = { virtual = "." }
|
source = { virtual = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "grpcio" },
|
{ name = "grpcio" },
|
||||||
|
{ name = "grpcio-reflection" },
|
||||||
{ name = "grpcio-tools" },
|
{ name = "grpcio-tools" },
|
||||||
{ name = "langchain" },
|
{ name = "langchain" },
|
||||||
{ name = "langchain-community" },
|
{ name = "langchain-community" },
|
||||||
|
|
@ -179,6 +180,7 @@ dependencies = [
|
||||||
[package.metadata]
|
[package.metadata]
|
||||||
requires-dist = [
|
requires-dist = [
|
||||||
{ name = "grpcio", specifier = ">=1.78.0" },
|
{ name = "grpcio", specifier = ">=1.78.0" },
|
||||||
|
{ name = "grpcio-reflection", specifier = ">=1.78.0" },
|
||||||
{ name = "grpcio-tools", specifier = ">=1.78.0" },
|
{ name = "grpcio-tools", specifier = ">=1.78.0" },
|
||||||
{ name = "langchain", specifier = ">=1.2.10" },
|
{ name = "langchain", specifier = ">=1.2.10" },
|
||||||
{ name = "langchain-community", specifier = ">=0.4.1" },
|
{ name = "langchain-community", specifier = ">=0.4.1" },
|
||||||
|
|
@ -544,6 +546,19 @@ wheels = [
|
||||||
{ url = "https://files.pythonhosted.org/packages/48/b2/b096ccce418882fbfda4f7496f9357aaa9a5af1896a9a7f60d9f2b275a06/grpcio-1.78.0-cp314-cp314-win_amd64.whl", hash = "sha256:dce09d6116df20a96acfdbf85e4866258c3758180e8c49845d6ba8248b6d0bbb", size = 4929852, upload-time = "2026-02-06T09:56:45.885Z" },
|
{ url = "https://files.pythonhosted.org/packages/48/b2/b096ccce418882fbfda4f7496f9357aaa9a5af1896a9a7f60d9f2b275a06/grpcio-1.78.0-cp314-cp314-win_amd64.whl", hash = "sha256:dce09d6116df20a96acfdbf85e4866258c3758180e8c49845d6ba8248b6d0bbb", size = 4929852, upload-time = "2026-02-06T09:56:45.885Z" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "grpcio-reflection"
|
||||||
|
version = "1.78.0"
|
||||||
|
source = { registry = "https://pypi.org/simple" }
|
||||||
|
dependencies = [
|
||||||
|
{ name = "grpcio" },
|
||||||
|
{ name = "protobuf" },
|
||||||
|
]
|
||||||
|
sdist = { url = "https://files.pythonhosted.org/packages/31/06/337546aae558675f79cae2a8c1ce0c9b1952cbc5c28b01878f68d040f5bb/grpcio_reflection-1.78.0.tar.gz", hash = "sha256:e6e60c0b85dbcdf963b4d4d150c0f1d238ba891d805b575c52c0365d07fc0c40", size = 19098, upload-time = "2026-02-06T10:01:52.225Z" }
|
||||||
|
wheels = [
|
||||||
|
{ url = "https://files.pythonhosted.org/packages/df/6d/4d095d27ccd049865ecdafc467754e9e47ad0f677a30dda969c3590f6582/grpcio_reflection-1.78.0-py3-none-any.whl", hash = "sha256:06fcfde9e6888cdd12e9dd1cf6dc7c440c2e9acf420f696ccbe008672ed05b60", size = 22800, upload-time = "2026-02-06T10:01:33.822Z" },
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "grpcio-tools"
|
name = "grpcio-tools"
|
||||||
version = "1.78.0"
|
version = "1.78.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue