Commit Graph
60 Commits
Author SHA1 Message Date
Freda Lai 3a3b23682a fix(wren-ui): Update relationship selector validation logic and UI (#77)
* fix(wren-ui): fix to field model list

* fix(wren-ui): fix field validate logic

* feat(wren-ui): update relation modal UI
2024-04-08 12:17:50 +08:00
Shimin 9aaec73e6e chore(wren-ui): add links to UI (#78) 2024-04-08 12:17:32 +08:00
Shiminandshimin c93502031b chore(wren-ui): UI improvement (#76)
* chore(wren-ui): adjust relation wording to relationship

* chore(wren-ui): adjust header color & button style

* chore(wren-ui): adjust styles of home/:id page's answer result

* fix(wren-ui): relationship path enum

---------

Co-authored-by: shimin <shimin@shimins-MacBook-Pro.local>
2024-04-08 12:15:53 +08:00
Freda Lai b84e3655f8 feat(wren-ui): UI integrating API - preview data (#63)
* feat(wren-ui): add home preview data API schema

* feat(wren-ui): support preview data
2024-04-03 17:02:15 +08:00
shimin 157aa8960e chore(wren-ui): add check-types to linting, align lint with build 2024-04-03 16:18:09 +08:00
shimin 463f5ac7a8 chore(wren-ui): add favicon & remove nextjs related svgs 2024-04-03 16:18:09 +08:00
Shiminandshimin 3e47c645a8 feat(wren-ui): Integrating suggested questios API (#73)
* feat(wren-ui): integrating suggested questios API

* fix(wren-ui): fix suggested questions types in resolver

---------

Co-authored-by: shimin <shimin@shimins-MacBook-Pro.local>
2024-04-03 16:17:42 +08:00
Jia-Xuan Liu 9bc20250a4 provide json schema for mdl (#66) 2024-04-03 15:58:01 +08:00
Chih-Yu Yeh 69263e6dd9 Chore/docker compose update (#69)
* update docker related settings

* change WREN_AI_SERVICE_PORT default 5555

* add pull_policy, restart condition and update wren-ai-service port

* fix default port for wren-ai-service
2024-04-03 15:57:09 +08:00
william chang(張仲威) c1c4241c1a Fix preview data issue & making sql formatted in askingTask API (#74)
* fix(wren-ui/askingService): fix sql cte construction issue

* fix(wren-ui/askingResolver): add resovler to ResultCandidate, to sql will be formated as well in askingTask query
2024-04-03 15:51:40 +08:00
Pao Sheng ff7b54e5ba feature(ai-service): fix a wrong input name in the release image workflow (#70) 2024-04-03 11:02:23 +08:00
Pao ShengandChih-Yu Yeh 342f87647d feature(ai-service): automatically create docker image when pr merged (#59)
* support the workflow to build nightly image

* remove the testing branch

* remove the deprecated workflow

* release nightly image workflow

* remove the testing branch

* rename the workflows

* manual release image workflow

* remove the testing branch

* release stable image

* remove the testing code

---------

Co-authored-by: Chih-Yu Yeh <chihyu.jimmy.yeh@gmail.com>
2024-04-02 23:33:12 +08:00
Andy Yen e03123515e fix suggestedQuestions API (#68) 2024-04-02 19:10:10 +08:00
Freda Lai 4eb49cf5c5 feat(wren-ui): Support sample data UI (#53)
* feat(wren-ui): Support sample data UI

* feat(wren-ui): Use SampleDatasetName enum instead of

* fixup! feat(wren-ui): Support sample data UI
2024-04-02 18:35:25 +08:00
Andy Yen c30cfe05c6 fix lint issue (#65) 2024-04-02 17:53:26 +08:00
Shiminandshimin 8d69cbbe67 feat(wren-ui): Integrating home & home sidebar (#55)
* feat(wren-ui): add home API schema

* feat(wren-ui): integrating query thread to sidebar

* feat(wren-ui): integrating asking task & thread response to home & home/:id

* feat(wren-ui): refine home flow & add thread rename, delete

* fix(wren-ui): response detail steps null error in nested resolver

* style(wren-ui): refine home components style

* style(wren-ui): change no result icon color to gold-6

* refactor(wren-ui): extract asking task to hook & refine thread components arrangement & add error alert to thread response

* feat(wren-ui): add error handlers to askingTask & thread mutation

* fix(wren-ui): fix effect issue when router redirect after thread delete

* fix(wren-ui): fix enum to uppercase & remove unused after rebase conflict

* fix(wren-ui): add status to cancel ask API body & fix 422 error

* chore(wren-ui): extract AI service error detail to logger

---------

Co-authored-by: shimin <shimin@shimins-MacBook-Pro.local>
2024-04-02 15:49:55 +08:00
Andy Yen 3ae0f88de9 avoid deploy multiple time when onboarding with sample dataset (#62) 2024-04-02 15:42:50 +08:00
Pao ShengandChih-Yu Yeh 946f727a4f Implement Ask details pipeline evaluation process (#42)
* add missing prompt builder

* remove the traced component

* todo comment to mention the eval process

* run the example for the ragas evaluator

* update the ignoring pattern for the spider dataset and output folder

* produce the eval context

* refactor the function to produce the eval context

* check whether the evaluation context exists

* test ragas evaluator

* implement a collector to execute the evaluation process

* cost, latency analysis

* modify the structure and todo comment

* modify the result structure

* implement LLM as a Judge

* implement a class to collect all result and summarize the evaluation

* adjust minor details

* support eval different pipeline via make

* remove duplicated pattern in gitignore file

* restructure the eval package

* extract the functions and classes to the utils module

* add streamlit app to present the result

* adjust the structure

* remove the testing suffix for evaluation context

* update the makefile and fix the wrong parameter name in ask details pipeline

* rename the init parameter to make them simplify

* add the original response in post_processor

* modify the report file name format

* use post_process_result to evaluate the sql execution correctness

* use entire CTE query to engine for validating the SQL

* modify the output name

---------

Co-authored-by: Chih-Yu Yeh <chihyu.jimmy.yeh@gmail.com>
2024-04-02 14:31:07 +08:00
Pao Sheng 93da460149 feature(ai-service): automatically re-run the CI after pushing the new commits (#61)
* Path filter detect the files to trigger CI when pushing

* demo

* demo not tirgger

* remove demo files
2024-04-02 14:22:36 +08:00
Freda Lai d8cb45a193 chore(wren-ui): fix warning about sqlite does not support inserting default values (#60) 2024-04-02 10:44:16 +08:00
6834e1c2de feat(wren-ui): UI integrating API to model diagram (#47)
* feat(wren-ui): add diagram API for modeling

* feat(wren-ui): integrating modeling diagram with diagram API

* chore(wren-ui): remove unused adapter, types & model files

* Chore(Wren-ui): remove mock resolver (#48)

* chore: remove mock resolver

* rm empty file

* fix(wren-ui): fix all build error after rebase conflict

* chore(wren-ui): remove usable data source schema

---------

Co-authored-by: shimin <shimin@shimins-MacBook-Pro.local>
Co-authored-by: Andy Yen <38731840+onlyjackfrost@users.noreply.github.com>
2024-04-02 10:41:29 +08:00
Andy Yen d32b02967d Fix: add sample dataset relations and Implement suggestedQuestion api (#58)
* fix(wren-ui): add sample dataset relations

* feature(wren-ui): implement askQuestion API
2024-04-02 10:01:14 +08:00
Pao ShengandChihYu Yeh 8b4d8c90df Feature(ai-service): catch the exceptions for web APIs (#54)
* catch all exceptions via a handler

* catch request validation and unify the response details

* add a test case to validate web error handler

* change http status code of RequestValidationError to 400

---------

Co-authored-by: ChihYu Yeh <chihyu.jimmy.yeh@gmail.com>
2024-04-01 22:16:43 +08:00
william chang(張仲威) 4ff1ae0678 Feature/home api (#41)
* feat(wren-ui): wrenAIAdaptor

* feat(wren-ui): migration file to add thread tables

* feat(wren-ui): ask feature & thread graphql resolver

* feat(wren-ui): thread repository

* feat(wren-ui): finish ask & thread api

* docker-compose for dev

* fix(wren-ui): fix some transformation issues in API

* fix(wren-ui/ask-feature): fix business logics in thread API

* fix(wren-ui): revert some configs back

* feat(wren-ui/ask): add follow-up question support

* support update/delete thread

* feat(wren-ui/ask): finish preview data & show full sql apis

* feat(wren-ui/ask): use allSettle to print error message if a job failed

* feat(wren-ui/ask): remove showsql mutation & put sql into threadResponse.detail

* fix(wren-ui/ask): fix lint issue

* fix(apollo): handle error formating

* error handling

* change of to create in error
2024-04-01 18:19:36 +08:00
Pao Sheng 8127af8e69 verify the openai key (#56) 2024-04-01 16:48:22 +08:00
Andy Yen 71f97a3b72 Chore: refactor onboarding process (#51)
* refactor onboarding process

* update sample data

* fix deploy error and add more log
2024-04-01 13:43:03 +08:00
Freda Lai be367b62ae feat(wren-ui): Support DuckDB data source (#46) 2024-04-01 11:37:20 +08:00
Freda Lai a5fdcf8a20 Feature(wren-ui): Connect onboarding APIs (#35)
* feat(wren-ui): update GraphQL API schema

* feat(wren-ui): connect mutation saveDataSource API

* feat(wren-ui): connect setup models related APIs

* feat(wren-ui): connect setup relation related APIs

* chore(wren-ui): update mock resolver - model

* feat(wren-ui): set default loading indicator

* feat(wren-ui): handle onboarding fallback

* chore(wren-ui): update component page

* feat(wren-ui): add apollo error handler

* fixup! feat(wren-ui): connect setup relation related APIs

* fixup! feat(wren-ui): handle onboarding fallback

* fixup! fixup! feat(wren-ui): handle onboarding fallback
2024-04-01 11:28:28 +08:00
Chih-Yu YehandPao Sheng 32cd3df311 Feature/ai service/fix failed sql queries + add error code (#50)
* resolve conflict

* allow visualization using one file

* remove default argparse option value

* resolve conflict

* resolve conflict

* resolve conflict

* update setup instructions

* resolve conflict

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* add anthropic model pricing

* allow change model for anthropic

* resolve conflicts

* resolve conflicts

* remove invalid sql generation results

* WIP: add sql correction

* add sql correction pipeline

* update ai service ci yaml

* update eval

* add instructions for running tests

* add comments for cte_name validation for last step

* use wren-engine api to validate sql instead of wren-engine psql

* simplify testing instructions

* update testing step

* create missing dir

* fix commands

* add WREN_ENGINE_ENDPOINT

* update WREN_ENGINE_ENDPOINT

* add container:ubuntu

* undo

* changed to localhost

* adjust docker network

* test ci

* test ci

* update

* update

* update

* revert

* update

* revert

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* fix bug

* update

* remove contest

* Feature/ai service/add error code (#40)

* resolve conflict

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* refine

* remove unused files

* resolve conflicts

* add error code and post processor to ask details

* add volume for qdrant and WREN_ENGINE_ENDPOINT for wren-ai-service

* add status check for ask service and fix tests

* Update wren-ai-service/tests/services/test_ask_details.py

Co-authored-by: Pao Sheng <paooap.oappao@gmail.com>

* Update wren-ai-service/tests/services/test_ask_details.py

Co-authored-by: Pao Sheng <paooap.oappao@gmail.com>

---------

Co-authored-by: Pao Sheng <paooap.oappao@gmail.com>

---------

Co-authored-by: Pao Sheng <paooap.oappao@gmail.com>
2024-03-28 15:11:30 +08:00
Pao Sheng 1ceff7e24c Revert "Feature(wren-ai-service): fix failed sql queries (#39)" (#49)
This reverts commit 87c21e486a.
2024-03-28 14:21:31 +08:00
Chih-Yu Yeh 87c21e486a Feature(wren-ai-service): fix failed sql queries (#39)
* resolve conflict

* allow visualization using one file

* remove default argparse option value

* resolve conflict

* resolve conflict

* resolve conflict

* update setup instructions

* resolve conflict

* resolve conflicts

* resolve conflicts

* resolve conflicts

* resolve conflicts

* add anthropic model pricing

* allow change model for anthropic

* resolve conflicts

* resolve conflicts

* remove invalid sql generation results

* WIP: add sql correction

* add sql correction pipeline

* update ai service ci yaml

* update eval

* add instructions for running tests

* add comments for cte_name validation for last step

* use wren-engine api to validate sql instead of wren-engine psql

* simplify testing instructions

* update testing step

* create missing dir

* fix commands

* add WREN_ENGINE_ENDPOINT

* update WREN_ENGINE_ENDPOINT

* add container:ubuntu

* undo

* changed to localhost

* adjust docker network

* test ci

* test ci

* update

* update

* update

* revert

* update

* revert

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* fix bug

* update

* remove contest
2024-03-28 11:54:53 +08:00
Andy Yen 112394f68c Feature(Wren-ui): add sample dataset & onboarding with sample dataset API (#43)
* feat(wren-ui): onboarding process support duckdb as datasource

* fix lint

* feat(wren-ui): add music sample data initsqls

* feat(wren-ui): start with sample dataset

* add more sample dataset

* update config after datasource saved
2024-03-27 12:03:48 +08:00
Andy Yen 26d4da41e3 Feature(wren-ui) duckdb onboarding process (#38)
* implement deploy mdl

* feat(wren-ui): onboarding process support duckdb as datasource

* fix lint
2024-03-27 11:54:38 +08:00
Andy Yen e73cf7acbc Fix(wren-ai): relation should generate column in related models (#34)
* fix(wren-ai): relation should generate column in related models

* rename function
2024-03-25 19:38:15 +08:00
Chih-Yu YehandPao Sheng d7ab444737 Chore/ai service/minor updates (#31)
* resolve conflict

* allow visualization using one file

* remove default argparse option value

* resolve conflict

* resolve conflict

* resolve conflict

* update setup instructions

* resolve conflict

* resolve conflict

* wip: add anthropic generator

* update

* refactor

* add llm_provider to separate openai and anthropic conditions

* update openai dep

* reformat

* add anthropic model pricing

* allow change model for anthropic

* remove anthropic

* make n 1 and temperatore 0

* remove assert generation size

* remove assert generation size

* update

* remove generation size assertion

* allow upload mdl file

* fix formatting issue

* change default dataset to college3

* change wren-engine to latest version

* refine environment setup

* minimize docker image size from 1.68GB to 500MB

* reduce image size from 500MB to 330MB

* simplify generation pipeline

* add QDRANT_HOST

* fix bug

---------

Co-authored-by: Pao Sheng <paooap.oappao@gmail.com>
2024-03-25 19:33:45 +08:00
william chang(張仲威) 3234dc218b Feature/wren launcher (#33)
* feat(dockerfile): add standalone option. fix eslint issues at next.config.js

* feat(docker): add docker-compose file

* feat(launcher): init project

* feat(launcher): use docker-compose sdk to run containers

* feat(laucner): wait until checking if CheckWrenAIStarted return without error

* feat(launcher): CheckDockerDaemonRunning

* feat(laucher): format the message

* feat(launcher): fix regex replace api key

* readme
2024-03-25 17:42:20 +08:00
Andy Yen b1b09f8744 Feature(Wren-ui): deploy to wren-engine and wren-ai (#32)
* implement deploy mdl

* refactor error message

* implement Query modelSync, reset project before saving datasource , reset models & columns before saving models

* Skip the record type column and its subfield in when listing column
2024-03-25 17:06:59 +08:00
Shiminandshimin 4f84e70970 feat(wren-ui): Adjust to read-only modeling diagram (#28)
* feat(wren-ui): add read-only pagination when columns over 50

* chore(wren-ui): adjust relation popover title & details

* chore(wren-ui): remove detail popover of column

* chore(wren-ui): remove more icon action of model diagram

* chore(wren-ui): remove metric in diagram

* chore(wren-ui): remove view in diagram

* fix(wren-ui): change typo according to spec

---------

Co-authored-by: shimin <shimin@shimins-MacBook-Pro.local>
2024-03-25 11:13:03 +08:00
william chang(張仲威) ffbb2c4084 Feature: build wren-ui docker image & docker-compose to start all service we need (#27)
* feat(dockerfile): add standalone option. fix eslint issues at next.config.js

* feat(docker): add docker-compose file

* feat(docker): add QDRANT_HOST

* feat(docker): modify docker-compose to add a bootstrap runner

* feat(docker): bootstrap service

* feat(wren-ui): add dockerfile for wren-ui

* fix(wren-ui): rm docker entry script

* feat(docker): publish ui & bootstrap packages

* feat(docker): remove comment in dockerfile & put up a how to start in readme

* fix(docker): change ai-service port to 80
2024-03-22 16:39:48 +08:00
Pao Sheng e456677fa2 Chore: Add a optional input to determine whether putting the latest tag on docker image (#30) 2024-03-21 18:15:11 +08:00
Shiminandshimin 7e0b340c68 feat(wren-ui): Adjust home sidebar & navbar UI (#24)
* chore(wren-ui): adjust home sidebar & navbar

* feat(wren-ui): add new wren AI logo

* chore(wren-ui): remove copy link on sidebar

* refactor(wren-ui): move unknown text to constant

---------

Co-authored-by: shimin <shimin@shimins-MacBook-Pro.local>
2024-03-21 10:18:44 +08:00
Shimin 576b27cb3b fix(wren-ui): Errors when running yarn build (#26)
* fix(wren-ui): remove unused vars in maldBuilder

* fix(wren-ui): add type conversion to unify signatures

* fix(wren-ui): fix tableFormControl errors before removing

* fix(wren-ui): fix component file before removing

* fix(wren-ui): fix path HOME to Home to unify the naming style
2024-03-21 10:14:00 +08:00
Pao Sheng 10f0d007c1 Feature: implement a workflow for building image and deploying to GitHub (#23)
* chore(wren-ai-service): modify the git ignore pattern to ignore the outpus and spider folder

* chore(wren-ai-service): classify the workflows by diff folder

* chore(wren-ai-service): testing commit

* chore(wren-ai-service): move the the correct folder

* feature(wren-ai-service): impl building image CI

* feature(wren-ai-service): modify the infor to login the registry

* fix(wren-ai-service): avoid the src folder not found

* feature(wren-ai-service): add the latest tag
2024-03-20 18:39:04 +08:00
Andy Yen ada9604d2b Feature: implement modeling feature (#15)
* fix repository implementation, fix migration file unique key, fix lint

* implement modeling graphql Queries *and Mutations

* feature(wren-ui): implement Query onboardingStatus

* fix mdl builder

* modify onboarding process, generate relation name when save

* fix mdlBulder and add test cases

* use datasetId to connect to BigQuery

* fix: adjust autoGenerateRelation response and saveRelations input format

* chore: set Encryptor props as readonly

* chore: rename method
2024-03-20 17:55:28 +08:00
Freda Lai a41822460a chore(wren-ui): remove calculated field table import from model metadata 2024-03-20 11:55:34 +08:00
Freda Lai 58fe50a650 chore(wren-ui): remove view metadata import 2024-03-20 11:55:34 +08:00
Freda Lai 8351b8f8d1 chore(wren-ui): remove metric metadata import 2024-03-20 11:55:34 +08:00
Freda Lai 491aa1d4c0 feat(wren-ui): remove generate metadata 2024-03-20 11:55:34 +08:00
Freda Lai 7d1909d85d feat(wren-ui): adjust model metadata drawer to be read-only 2024-03-20 11:55:34 +08:00
Freda Lai f3839739bf feat(wren-ui): use reference name as metadata drawer title 2024-03-20 11:55:34 +08:00