From f057b39f1babcc42e1115db76027a1aabdfe0346 Mon Sep 17 00:00:00 2001 From: Casper van Langen Date: Tue, 6 Feb 2024 14:16:27 +0000 Subject: [PATCH 1/5] fix: update readme links to deployed docs --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 34a5ff6..d422281 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The starter pack is based on the latest technologies for optimal performance, se * 🖍 Linting, tests and pre-commit hooks pre-configured ## Quickstart -For a quick setup of AgentKit, use the steps below, where both the backend app and frontend app are run inside a Docker container. More elaborate setup instructions can be found at [setup.md](docs/docusaurus/docs/setup.md). +For a quick setup of AgentKit, use the steps below, where both the backend app and frontend app are run inside a Docker container. More elaborate setup instructions can be found in the [documentation](https://agentkit.infra.x.bcg.com/docs/introduction). ### Prerequisites - Docker: https://www.docker.com/get-started @@ -52,7 +52,7 @@ For a quick setup of AgentKit, use the steps below, where both the backend app a - Follow the installation instructions above and swap `docker-compose.yml` with `docker-compose-demo.yml` to run the app - Try the prompt "How many artists and songs are there in the database?" to see AgentKit in action! -Check out a more advanced [demo](https://agentkit.infra.x.bcg.com) build following the [tutorial](docs/docusaurus/docs/tutorial/tutorial.md). +Check out a more advanced [demo](https://agentkit.infra.x.bcg.com) build following the [tutorial](https://agentkit.infra.x.bcg.com/docs/tutorial/). ## Set up your own app - Configure your Agent and Tools [link](docs/docusaurus/docs/configuration/configure_agent_and_tools.md) @@ -62,12 +62,12 @@ Check out a more advanced [demo](https://agentkit.infra.x.bcg.com) build followi ## Documentation Find the [hosted documentation here](https://agentkit.infra.x.bcg.com/docs/introduction). -- [Installation instructions for running frontend or entire app outside Docker](docs/docusaurus/docs/setup/setup_development.md) -- [Key concepts](docs/docusaurus/docs/how_it_works/key_concepts.md) -- [Agent and Tools configuration](docs/docusaurus/docs/configuration/configure_agent_and_tools.md) -- [UI configuration](docs/docusaurus/docs/configuration/configure_ui.md) -- [Optional features](docs/docusaurus/docs/advanced/optional_features.md) -- [Tool library](docs/docusaurus/docs/tool_library/) +- [Installation instructions for running frontend or entire app outside Docker](https://agentkit.infra.x.bcg.com/docs/setup/setup_development) +- [Key concepts](https://agentkit.infra.x.bcg.com/docs/how_it_works/key_concepts) +- [Agent and Tools configuration](https://agentkit.infra.x.bcg.com/docs/configuration/configure_agent_and_tools) +- [UI configuration](https://agentkit.infra.x.bcg.com/docs/configuration/configure_ui) +- [Optional features](https://agentkit.infra.x.bcg.com/docs/advanced/optional_features) +- [Tool library](https://agentkit.infra.x.bcg.com/docs/tool_library/) ## How it works From 1c3d1840678d6be65f05fd790b9da3fced9fb158 Mon Sep 17 00:00:00 2001 From: Casper van Langen Date: Tue, 6 Feb 2024 14:23:37 +0000 Subject: [PATCH 2/5] cleanup: .env.example comments --- .env.example | 15 +++++++++------ frontend/.env.example | 4 ++-- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 9bec06f..025a083 100644 --- a/.env.example +++ b/.env.example @@ -6,18 +6,21 @@ # secrets in it. If you are cloning this repo, create a copy of this file named # ".env" and populate it with your secrets. +# When adding additional environment variables, the schema in "backend/app/app/core/config.py" +# should be updated accordingly. + ############################################# # OpenAPI variables ############################################# OPENAI_API_KEY= # OpenAI API key OPENAI_ORGANIZATION= # OpenAI organization ID -ENABLE_LLM_CACHE=false # flag to enable or disable LLM cache in redis +ENABLE_LLM_CACHE=false # Set to true to enable LLM cache in redis ############################################# # Authentication variables ############################################# -ENABLE_AUTH=false # flag to enable or disable authentication -NEXTAUTH_SECRET= # Add the same secret as in the FE .env file +ENABLE_AUTH=false # Set to true to enable authentication +NEXTAUTH_SECRET= # Add the same secret as in the frontend .env file NEXTAUTH_URL="http://localhost:3000" # Add the url as in the FE .env file ############################################# @@ -52,7 +55,7 @@ REDIS_HOST=redis_server REDIS_PORT=6379 ############################################# -# Minio variables +# Minio variables (if you want to use minio, currently not included in standard setup) ############################################# MINIO_URL=storage.localhost MINIO_BUCKET=fastapi-minio @@ -62,7 +65,7 @@ MINIO_ROOT_PASSWORD=minioadmin ############################################# # SQL Tool DB ############################################# -SQL_TOOL_DB_ENABLED="true" # Set to "true" to enable the SQL database tool. +SQL_TOOL_DB_ENABLED=true # Set to true to enable the SQL database tool. SQL_TOOL_DB_URI='postgresql://postgres:postgres@database/postgres?connect_timeout=10' # docker url SQL_TOOL_DB_SCHEMAS='["public"]' SQL_TOOL_DB_INFO_PATH='app/tool_constants/sql_tool_db_info.json' @@ -78,7 +81,7 @@ AGENT_CONFIG_PATH='app/config/agent.yml' # PDF Tool ############################################# PDF_PATH='app/tool_constants/pdf_data' -PDF_TOOL_ENABLED="true" +PDF_TOOL_ENABLED=true # Set to true to enable the PDF RAG tool. PDF_TOOL_DATA_PATH='app/tool_constants/pdf_data' # backend/app/app/tool_constants/pdf_data for local dev PDF_TOOL_DATABASE='pdf_indexing_1' PDF_TOOL_EXTRACTION_CONFIG_PATH='app/config/extraction.yml' # backend/app/app/config/extraction.yml for local dev diff --git a/frontend/.env.example b/frontend/.env.example index 2c40cc7..5069b31 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -21,11 +21,11 @@ NEXT_PUBLIC_ENABLE_MESSAGE_FEEDBACK=false # Enables Langsmith feedback prompting # You can generate a new secret on the command line with: # openssl rand -base64 32 # https://next-auth.js.org/configuration/options#secret -NEXT_PUBLIC_USE_AUTH=false # flag to enable or disable authentication +NEXT_PUBLIC_USE_AUTH=false # Set to true to enable authentication NEXTAUTH_SECRET= # TODO: Generate a secret and add it here (see above) NEXTAUTH_URL="http://localhost:3000" NEXTAUTH_URL_INTERNAL="http://localhost:3000" -GITHUB_ENTERPRISE_URL="https://github.your.enterprise.com/" # TEMPORARY: for BCG users use https://github.gamma.bcg.com +GITHUB_ENTERPRISE_URL="https://github.your.enterprise.com/" # Next Auth Provider GITHUB_ID="cadd5256336ae4912af2" From 583d8890a61473988f58536c43d18727c4613807 Mon Sep 17 00:00:00 2001 From: Casper van Langen Date: Tue, 6 Feb 2024 14:28:30 +0000 Subject: [PATCH 3/5] cleanup: remove todos --- .../components/ToolAppendixRenderer/CodeFlipCard/JsxDisplay.tsx | 2 +- .../ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx | 2 +- .../src/components/ToolAppendixRenderer/CodeFlipCard/index.tsx | 2 -- frontend/src/components/ToolAppendixRenderer/index.tsx | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/JsxDisplay.tsx b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/JsxDisplay.tsx index c750be8..543364f 100644 --- a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/JsxDisplay.tsx +++ b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/JsxDisplay.tsx @@ -40,7 +40,7 @@ const JsxDisplay = (props: Props) => { const { code, data, graph_ref } = props let visData = data - // TODO: Current safeguard for rendering performance issues + // Current safeguard for rendering performance issues if (visData.length > 10000) { console.warn("Data too large, only rendering first 10000 rows") visData = visData.slice(0, 10000) diff --git a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx index b9737a5..ee3722d 100644 --- a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx +++ b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx @@ -9,7 +9,7 @@ const TextAreaEditor = (props: Props) => { const [value, setValue] = useState(code) // submit code to backend const handleSubmit = () => { - //TODO - submit code to backend + //TODO - submit code to backend } return ( <> diff --git a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/index.tsx b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/index.tsx index 4447c2c..2fa4efc 100644 --- a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/index.tsx +++ b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/index.tsx @@ -123,8 +123,6 @@ const CodeFlipCard = (props: Props) => { method: "GET", headers: { "Content-Type": "application/json", - // TODO: Add authorisation header (JWT) - // "Authorization": `Bearer ${API_KEY}`, }, } ) diff --git a/frontend/src/components/ToolAppendixRenderer/index.tsx b/frontend/src/components/ToolAppendixRenderer/index.tsx index 8747c81..8f0ea5b 100644 --- a/frontend/src/components/ToolAppendixRenderer/index.tsx +++ b/frontend/src/components/ToolAppendixRenderer/index.tsx @@ -25,7 +25,6 @@ const ToolAppendixRenderer = (props: Props) => { }) switch (data.language) { - // TODO: Separate library/application-specific (e.g. CLINGOV_URL) from generic (e.g. SQL, JSX) syntax languages in renderings case SUPPORTED_SYNTAX_LANGUAGES.SQL: case SUPPORTED_SYNTAX_LANGUAGES.JSX: case SUPPORTED_SYNTAX_LANGUAGES.CLINGOV_URL: From afc3a360ef6eed1bdb2691eb7f0d4fad8adea834 Mon Sep 17 00:00:00 2001 From: Casper van Langen Date: Tue, 6 Feb 2024 21:53:00 +0000 Subject: [PATCH 4/5] fix: master branch is now main --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0b6234b..152c532 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,7 +9,7 @@ We want to make contributing to this project as easy and transparent as possible We use Github to host code, to track issues and feature requests, as well as accept pull requests. We actively welcome your pull requests: -1. Fork the repo and create your branch from `develop`. +1. Fork the repo and create your branch from `main`. 2. If you've changed key features (tools, APIs etc), update the documentation. 3. Ensure the code is clean: passes the set of tests, lints etc. 5. Issue a pull request to the main repo From ffa73f160fa00cdb4028cf4935745d67f763739d Mon Sep 17 00:00:00 2001 From: Casper van Langen Date: Wed, 7 Feb 2024 09:51:50 +0000 Subject: [PATCH 5/5] chore: prettier --- .../ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx index ee3722d..b9737a5 100644 --- a/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx +++ b/frontend/src/components/ToolAppendixRenderer/CodeFlipCard/TextAreaEditor.tsx @@ -9,7 +9,7 @@ const TextAreaEditor = (props: Props) => { const [value, setValue] = useState(code) // submit code to backend const handleSubmit = () => { - //TODO - submit code to backend + //TODO - submit code to backend } return ( <>