Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyeh committed Nov 17, 2024
2 parents cf8a334 + a7373c8 commit 8efffdc
Show file tree
Hide file tree
Showing 85 changed files with 4,245 additions and 6,601 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ai-service-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install Just
uses: extractions/setup-just@v2
with:
just-version: "1.31.0"
just-version: "1.36.0"
- name: Prepare testing environment and Run tests
run: |
just test
Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ wren-ai-service/src/eval/wren-engine/etc/archived
wren-ai-service/src/eval/data
wren-ai-service/**/outputs/
wren-ai-service/**/spider/
wren-ai-service/tests/data/hubspot/
wren-ai-service/tests/data/usecases/
!wren-ai-service/**/metrics/spider/
!wren-ai-service/tests/data
!wren-ai-service/src/eval/data/book_2*.json
Expand All @@ -26,7 +26,8 @@ wren-ai-service/demo/poetry.lock
wren-ai-service/demo/custom_dataset
wren-ai-service/demo/.env
wren-ai-service/tools/dev/etc/**
wren-ai-service/.deepeval-cache.json
.deepeval-cache.json
docker/config.yaml

# python
.python-version
Expand Down
132 changes: 117 additions & 15 deletions deployment/kustomizations/base/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ kind: ConfigMap
metadata:
name: wren-config
data:

# Wren Engine Service Port
WREN_ENGINE_PORT: "8080"
# Wren AI Service Port
WREN_AI_SERVICE_PORT: "5555"
WREN_AI_SERVICE_ENABLE_TIMER: "1"

WREN_UI_ENDPOINT: http://wren-ui-svc:3000

Expand All @@ -18,25 +16,14 @@ data:
WREN_AI_SERVICE_VERSION: "0.10.4"
WREN_UI_VERSION: "0.16.0"

# LLM and Embedder Configurations
LLM_PROVIDER: "openai_llm"
LLM_OPENAI_API_BASE: "https://api.openai.com/v1"
GENERATION_MODEL: "gpt-4o-mini"

EMBEDDER_PROVIDER: "openai_embedder"
EMBEDDER_OPENAI_API_BASE: "https://api.openai.com/v1"

# Document store related
QDRANT_HOST: "wren-qdrant"
DOCUMENT_STORE_PROVIDER: "qdrant"

# Langfuse: for LLM tracing
LANGFUSE_HOST: "https://cloud.langfuse.com"
LANGFUSE_ENABLE: ""

# Telemetry
POSTHOG_HOST: "https://app.posthog.com"
TELEMETRY_ENABLED: "false"
# this is for telemetry to know the model, i think ai-service might be able to provide a endpoint to get the information
GENERATION_MODEL: "gpt-4o-mini"

# service endpoints of AI service & engine service
WREN_ENGINE_ENDPOINT: "http://wren-engine-svc:8080"
Expand All @@ -55,3 +42,118 @@ data:
LOGGING_LEVEL: INFO

IBIS_SERVER_ENDPOINT: http://wren-ibis-server-svc:8000
---
apiVersion: v1
kind: ConfigMap
metadata:
name: wren-ai-service-config
data:
config.yaml: |
type: llm
provider: openai_llm
models:
- model: gpt-4o-mini
kwargs:
{
"temperature": 0,
"n": 1,
"max_tokens": 4096,
"response_format": { "type": "json_object" },
}
- model: gpt-4o
kwargs:
{
"temperature": 0,
"n": 1,
"max_tokens": 4096,
"response_format": { "type": "json_object" },
}
api_base: https://api.openai.com/v1
timeout: 120
---
type: embedder
provider: openai_embedder
models:
- model: text-embedding-3-large
dimension: 3072
api_base: https://api.openai.com/v1
timeout: 120
---
type: engine
provider: wren_ui
endpoint: http://wren-ui-svc:3000
---
type: document_store
provider: qdrant
location: http://wren-qdrant:6333
embedding_model_dim: 3072
timeout: 120
---
type: pipeline
pipes:
- name: indexing
embedder: openai_embedder.text-embedding-3-large
document_store: qdrant
- name: retrieval
llm: openai_llm.gpt-4o-mini
embedder: openai_embedder.text-embedding-3-large
document_store: qdrant
- name: historical_question
embedder: openai_embedder.text-embedding-3-large
document_store: qdrant
- name: sql_generation
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: sql_correction
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: followup_sql_generation
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: sql_summary
llm: openai_llm.gpt-4o-mini
- name: sql_answer
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: sql_breakdown
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: sql_expansion
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: sql_explanation
llm: openai_llm.gpt-4o-mini
- name: sql_regeneration
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: semantics_description
llm: openai_llm.gpt-4o-mini
- name: relationship_recommendation
llm: openai_llm.gpt-4o-mini
engine: wren_ui
- name: question_recommendation
llm: openai_llm.gpt-4o-mini
- name: intent_classification
llm: openai_llm.gpt-4o-mini
embedder: openai_embedder.text-embedding-3-large
document_store: qdrant
- name: data_assistance
llm: openai_llm.gpt-4o-mini
---
settings:
column_indexing_batch_size: 50
table_retrieval_size: 10
table_column_retrieval_size: 100
allow_using_db_schemas_without_pruning: false
query_cache_maxsize: 1000
query_cache_ttl: 3600
langfuse_host: https://cloud.langfuse.com
langfuse_enable: true
enable_timer: false
logging_level: DEBUG
development: false
148 changes: 55 additions & 93 deletions deployment/kustomizations/base/deploy-wren-ai-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,99 +14,61 @@ spec:
spec:
containers:
- name: wren-ai-service
image: ghcr.io/canner/wren-ai-service:0.3.7
image: ghcr.io/canner/wren-ai-service:latest
volumeMounts:
- name: config-volume
mountPath: /app/data
env:
- name: WREN_AI_SERVICE_PORT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_AI_SERVICE_PORT
- name: LLM_PROVIDER
valueFrom:
configMapKeyRef:
name: wren-config
key: LLM_PROVIDER
- name: LLM_OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: LLM_OPENAI_API_KEY
- name: LLM_OPENAI_API_BASE
valueFrom:
configMapKeyRef:
name: wren-config
key: LLM_OPENAI_API_BASE
- name: EMBEDDER_PROVIDER
valueFrom:
configMapKeyRef:
name: wren-config
key: EMBEDDER_PROVIDER
- name: EMBEDDER_OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: EMBEDDER_OPENAI_API_KEY
- name: EMBEDDER_OPENAI_API_BASE
valueFrom:
configMapKeyRef:
name: wren-config
key: EMBEDDER_OPENAI_API_BASE
- name: GENERATION_MODEL
valueFrom:
configMapKeyRef:
name: wren-config
key: GENERATION_MODEL
- name: QDRANT_HOST
valueFrom:
configMapKeyRef:
name: wren-config
key: QDRANT_HOST
- name: DOCUMENT_STORE_PROVIDER
valueFrom:
configMapKeyRef:
name: wren-config
key: DOCUMENT_STORE_PROVIDER
- name: WREN_ENGINE_ENDPOINT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_ENGINE_ENDPOINT
- name: LOGGING_LEVEL
valueFrom:
configMapKeyRef:
name: wren-config
key: LOGGING_LEVEL
- name: WREN_UI_ENDPOINT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_UI_ENDPOINT
- name: ENABLE_TIMER
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_AI_SERVICE_ENABLE_TIMER
- name: PYTHONUNBUFFERED
value: "1"
- name: LANGFUSE_ENABLE
valueFrom:
configMapKeyRef:
name: wren-config
key: LANGFUSE_ENABLE
- name: LANGFUSE_HOST
valueFrom:
configMapKeyRef:
name: wren-config
key: LANGFUSE_HOST
- name: LANGFUSE_PUBLIC_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: LANGFUSE_PUBLIC_KEY
- name: LANGFUSE_SECRET_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: LANGFUSE_SECRET_KEY
- name: WREN_AI_SERVICE_PORT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_AI_SERVICE_PORT
- name: LLM_OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: LLM_OPENAI_API_KEY
- name: EMBEDDER_OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: EMBEDDER_OPENAI_API_KEY
- name: QDRANT_HOST
valueFrom:
configMapKeyRef:
name: wren-config
key: QDRANT_HOST
- name: LOGGING_LEVEL
valueFrom:
configMapKeyRef:
name: wren-config
key: LOGGING_LEVEL
- name: WREN_UI_ENDPOINT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_UI_ENDPOINT
- name: PYTHONUNBUFFERED
value: "1"
- name: LANGFUSE_PUBLIC_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: LANGFUSE_PUBLIC_KEY
- name: LANGFUSE_SECRET_KEY
valueFrom:
secretKeyRef:
name: wrenai-secrets
key: LANGFUSE_SECRET_KEY
- name: CONFIG_PATH
value: /app/data/config.yaml
ports:
- containerPort: 5555
volumes:
- name: config-volume
configMap:
name: wren-ai-service-config
items:
- key: config.yaml
path: config.yaml
2 changes: 1 addition & 1 deletion deployment/kustomizations/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ images:
- name: ghcr.io/canner/wren-ui
newTag: 0.9.2 # WREN_UI_VERSION
- name: ghcr.io/canner/wren-ai-service
newTag: 0.8.2 # WREN_AI_SERVICE_VERSION
newTag: commit-391ea49 # WREN_AI_SERVICE_VERSION
- name: ghcr.io/canner/wren-engine-ibis
newTag: 0.9.0 # IBIS_SERVER_VERSION

Expand Down
Loading

0 comments on commit 8efffdc

Please sign in to comment.