From 787448627fa59b78c1c69e983116c3533e458748 Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Mon, 11 Nov 2024 20:35:14 +0530 Subject: [PATCH 1/2] Recommed cookiecutter as default option and pip+venv as alternative (#554) * Fix docs for console basics * Fix broken links in docs * Commit cookiecutter generated files * Alter build docs script, fix fastapi adapter docs and add custom client code * WIP: fix nats docs * Fix Nats+fastapi doc and add custom rest api code * Fix nats adapter docs * Recommend cookiecutter as default option and pip+venv as an alternative --------- Co-authored-by: Davor Runje --- .secrets.baseline | 26 ++++++------------- .../en/user-guide/adapters/fastapi/index.md | 8 ++++-- .../user-guide/adapters/fastapi_nats/index.md | 8 ++++-- .../docs/en/user-guide/adapters/nats/index.md | 8 +++--- docs/docs/en/user-guide/api/openapi/index.md | 8 +++--- docs/docs/en/user-guide/api/security.md | 8 +++--- .../en/user-guide/runtimes/autogen/index.md | 8 +++--- .../runtimes/autogen/interactions.md | 8 +++--- .../autogen/using_non_openai_models.md | 8 +++--- .../user-guide/runtimes/autogen/websurfer.md | 8 +++--- .../user-guide/runtimes/autogen/whatsapp.md | 8 +++--- docs/docs/en/user-guide/ui/console/basics.md | 8 +++--- docs/docs/en/user-guide/ui/mesop/basics.md | 8 +++--- 13 files changed, 70 insertions(+), 52 deletions(-) diff --git a/.secrets.baseline b/.secrets.baseline index 6158368e..0085ff5a 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -169,7 +169,7 @@ "filename": "docs/docs/en/user-guide/adapters/fastapi_nats/index.md", "hashed_secret": "3be2e9dd1980856faddf5bd205e3ff96b24776aa", "is_verified": false, - "line_number": 315, + "line_number": 319, "is_secret": false } ], @@ -179,7 +179,7 @@ "filename": "docs/docs/en/user-guide/adapters/nats/index.md", "hashed_secret": "3be2e9dd1980856faddf5bd205e3ff96b24776aa", "is_verified": false, - "line_number": 160, + "line_number": 162, "is_secret": false } ], @@ -189,7 +189,7 @@ "filename": "docs/docs/en/user-guide/runtimes/autogen/index.md", "hashed_secret": "73b01af8d354687c7c330d91a744f9906b9f30da", "is_verified": false, - "line_number": 48, + "line_number": 50, "is_secret": false } ], @@ -199,7 +199,7 @@ "filename": "docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md", "hashed_secret": "29df8e701c64566b0035b6283fb2f7b41a0d65f2", "is_verified": false, - "line_number": 57, + "line_number": 59, "is_secret": false } ], @@ -209,7 +209,7 @@ "filename": "docs/docs/en/user-guide/runtimes/autogen/websurfer.md", "hashed_secret": "bc39a40e023f4ffb425b82830f86a464e5ea1072", "is_verified": false, - "line_number": 40, + "line_number": 42, "is_secret": false } ], @@ -219,7 +219,7 @@ "filename": "docs/docs/en/user-guide/runtimes/autogen/whatsapp.md", "hashed_secret": "52e0d11a70cdb70d4c51064d08bd8f179ebb8bb4", "is_verified": false, - "line_number": 38, + "line_number": 40, "is_secret": false }, { @@ -227,17 +227,7 @@ "filename": "docs/docs/en/user-guide/runtimes/autogen/whatsapp.md", "hashed_secret": "ec926cf43fb13c6d8575f5c366c488f5f2d2f5c4", "is_verified": false, - "line_number": 300, - "is_secret": false - } - ], - "docs/docs_src/getting_started/nats_n_fastapi/nats-server.conf": [ - { - "type": "Secret Keyword", - "filename": "docs/docs_src/getting_started/nats_n_fastapi/nats-server.conf", - "hashed_secret": "3be2e9dd1980856faddf5bd205e3ff96b24776aa", - "is_verified": false, - "line_number": 26, + "line_number": 302, "is_secret": false } ], @@ -262,5 +252,5 @@ } ] }, - "generated_at": "2024-11-11T13:07:26Z" + "generated_at": "2024-11-11T13:22:59Z" } diff --git a/docs/docs/en/user-guide/adapters/fastapi/index.md b/docs/docs/en/user-guide/adapters/fastapi/index.md index 2ab6f224..a6bca3fc 100644 --- a/docs/docs/en/user-guide/adapters/fastapi/index.md +++ b/docs/docs/en/user-guide/adapters/fastapi/index.md @@ -180,6 +180,12 @@ This section provides [**high-level architecture**](https://en.wikipedia.org/wik ## Installation +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. + === "Mesop" Before getting started, ensure that FastAgency is installed with support for the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime, along with the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md), **fastapi**, and **server** submodules by running the following command: @@ -200,8 +206,6 @@ This section provides [**high-level architecture**](https://en.wikipedia.org/wik This command installs FastAgency, but with [**FastAPI**](https://fastapi.tiangolo.com/){target="_blank"} serving input requests and running workflows. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Example: Student and Teacher Learning Chat === "Mesop" diff --git a/docs/docs/en/user-guide/adapters/fastapi_nats/index.md b/docs/docs/en/user-guide/adapters/fastapi_nats/index.md index 49b5dfc4..c97ec8af 100644 --- a/docs/docs/en/user-guide/adapters/fastapi_nats/index.md +++ b/docs/docs/en/user-guide/adapters/fastapi_nats/index.md @@ -84,6 +84,12 @@ Now, it's time to see the [**`FastAPIAdapter`**](../../../api/fastagency/adapter ## Installation +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. + === "Mesop" Before getting started, ensure that FastAgency is installed with support for the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime, along with the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md), **fastapi**, **server**, and **nats** submodules by running the following command: @@ -104,8 +110,6 @@ Now, it's time to see the [**`FastAPIAdapter`**](../../../api/fastagency/adapter This command installs FastAgency, but with [**FastAPI**](https://fastapi.tiangolo.com/){target="_blank"} serving input requests and independent workers communicating over [**Nats.io**](https://nats.io/){target="_blank"} protocol running workflows. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Example: Student and Teacher Learning Chat === "Mesop" diff --git a/docs/docs/en/user-guide/adapters/nats/index.md b/docs/docs/en/user-guide/adapters/nats/index.md index dd9111bd..0a22537a 100644 --- a/docs/docs/en/user-guide/adapters/nats/index.md +++ b/docs/docs/en/user-guide/adapters/nats/index.md @@ -40,7 +40,11 @@ Now, it's time to see the Nats Adapter using FastAgency in action. Let's dive in ## Installation -Before getting started, ensure that FastAgency is installed with support for the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime, along with the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md), **fastapi**, **server** and **nats** submodules by running the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, ensure that FastAgency is installed with support for the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime, along with the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md), **fastapi**, **server** and **nats** submodules by running the following command: ```bash pip install "fastagency[autogen,mesop,fastapi,server,nats]" @@ -48,8 +52,6 @@ pip install "fastagency[autogen,mesop,fastapi,server,nats]" This command installs FastAgency with support for both the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md) and [**console**](../../../api/fastagency/ui/console/ConsoleUI.md) interfaces for AutoGen workflows and the [**`NatsAdapter`**](../../../api/fastagency/adapters/nats/NatsAdapter.md) for workflow execution. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Example: Student and Teacher Learning Chat In this example, we'll create a simple learning [**chatbot**](https://en.wikipedia.org/wiki/Chatbot){target="_blank"} where a student agent asks questions and a teacher agent responds, simulating a learning environment. We'll use [**`MesopUI`**](../../../api/fastagency/ui/mesop/MesopUI.md) for the web interface and the [**`NatsAdapter`**](../../../api/fastagency/adapters/nats/NatsAdapter.md) for workflow execution. diff --git a/docs/docs/en/user-guide/api/openapi/index.md b/docs/docs/en/user-guide/api/openapi/index.md index b7ea90ac..7b24abb8 100644 --- a/docs/docs/en/user-guide/api/openapi/index.md +++ b/docs/docs/en/user-guide/api/openapi/index.md @@ -11,14 +11,16 @@ In this example, we'll use a simple [weather API](https://weather.tools.fastagen ## Install -To get started, you need to install FastAgency with OpenAPI submodule. You can do this using `pip`, Python's package installer. +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, you need to install FastAgency with OpenAPI submodule. You can do this using `pip`, Python's package installer. ```console pip install "fastagency[autogen,openapi]" ``` -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Imports These imports are similar to the imports section we have already covered, with the only difference being the additional imports of the `OpenAPI` Client and `UserProxyAgent`: diff --git a/docs/docs/en/user-guide/api/security.md b/docs/docs/en/user-guide/api/security.md index 37252ee3..7b15b3d5 100644 --- a/docs/docs/en/user-guide/api/security.md +++ b/docs/docs/en/user-guide/api/security.md @@ -133,14 +133,16 @@ For this tutorial, the [weather API](https://weather.tools.fastagency.ai/docs) p ### Install -The installation process is exactly the same as in the [previous chapter](./index.md){.internal-link}. +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. The installation process is exactly the same as in the [previous chapter](./index.md){.internal-link}. ```console pip install "fastagency[autogen,openapi]" ``` -Alternatively, you can use [**Cookiecutter**](../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ### Imports The imports are the same as in the [previous chapter](./index.md){.internal-link}, except here we also import `APIKeyHeader` to set the security value in the header: diff --git a/docs/docs/en/user-guide/runtimes/autogen/index.md b/docs/docs/en/user-guide/runtimes/autogen/index.md index 672c8a5d..432f599f 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/index.md +++ b/docs/docs/en/user-guide/runtimes/autogen/index.md @@ -6,7 +6,11 @@ In this example, we will create a simple weather [**chatbot**](https://en.wikipe ## Installation -Before getting started, make sure you have installed FastAgency with support for the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime along with the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md) and [**openapi**](../../../api/fastagency/api/openapi/OpenAPI.md) submodules by running the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, make sure you have installed FastAgency with support for the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime along with the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md) and [**openapi**](../../../api/fastagency/api/openapi/OpenAPI.md) submodules by running the following command: ```bash pip install "fastagency[autogen,mesop,openapi]" @@ -14,8 +18,6 @@ pip install "fastagency[autogen,mesop,openapi]" These components enable you to build [**multi-agent workflows**](https://microsoft.github.io/autogen/0.2/docs/Use-Cases/agent_chat){target="_blank"} and seamlessly integrate with the external [**Rest APIs**](https://en.wikipedia.org/wiki/REST){target="_blank"}. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Prerequisites Before you begin this guide, ensure you have: diff --git a/docs/docs/en/user-guide/runtimes/autogen/interactions.md b/docs/docs/en/user-guide/runtimes/autogen/interactions.md index 89c8cd04..36463b24 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/interactions.md +++ b/docs/docs/en/user-guide/runtimes/autogen/interactions.md @@ -5,14 +5,16 @@ In this example, we'll demonstrate how to create custom interaction with the use ## Install -To get started, you need to install FastAgency. You can do this using `pip`, Python's package installer. +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, you need to install FastAgency. You can do this using `pip`, Python's package installer. ```console pip install "fastagency[autogen]" ``` -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Define Interaction This section describes how to define functions for the `ConversableAgent` instances representing the student and teacher. We will also explain the differences between `MultipleChoice`, `SystemMessage`, and `TextInput`, which are used for communication between the user and agents. diff --git a/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md b/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md index f1ca4a96..342d62b6 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md +++ b/docs/docs/en/user-guide/runtimes/autogen/using_non_openai_models.md @@ -13,7 +13,11 @@ Let’s dive in! ## Installation -Before you get started, ensure that you have FastAgency installed. Run the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, ensure that you have FastAgency installed. Run the following command: ```bash pip install "fastagency[autogen,mesop,openapi]" @@ -21,8 +25,6 @@ pip install "fastagency[autogen,mesop,openapi]" This command installs the FastAgency library along with the [**AutoGen**](../../../api/fastagency/runtimes/autogen/autogen/AutoGenWorkflows.md) runtime and the [**mesop**](../../../api/fastagency/ui/mesop/MesopUI.md) and [**openapi**](../../../api/fastagency/api/openapi/OpenAPI.md) submodules. These components enable you to build [**multi-agent workflows**](https://microsoft.github.io/autogen/0.2/docs/Use-Cases/agent_chat){target="_blank"} and seamlessly integrate with the external [**Rest APIs**](https://en.wikipedia.org/wiki/REST){target="_blank"}. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Prerequisites Before you begin this guide, ensure you have: diff --git a/docs/docs/en/user-guide/runtimes/autogen/websurfer.md b/docs/docs/en/user-guide/runtimes/autogen/websurfer.md index 4228bf12..f265e6cb 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/websurfer.md +++ b/docs/docs/en/user-guide/runtimes/autogen/websurfer.md @@ -15,7 +15,11 @@ We’ll build agents and assign them the task: “Search for information about M ## Installation & Setup -Before getting started, make sure you have installed FastAgency with support for the AutoGen runtime by running the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, make sure you have installed FastAgency with support for the AutoGen runtime by running the following command: ```bash pip install "fastagency[autogen]" @@ -23,8 +27,6 @@ pip install "fastagency[autogen]" This command installs FastAgency with support for the Console interface and AutoGen framework. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ### Create Bing Web Search API Key To create [Bing Web Search](https://www.microsoft.com/en-us/bing/apis/pricing){target="_blank"} API key, follow the guide provided. diff --git a/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md b/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md index d3a32a3e..b8905ffd 100644 --- a/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md +++ b/docs/docs/en/user-guide/runtimes/autogen/whatsapp.md @@ -15,7 +15,11 @@ We’ll build agents and assign them the task: “Send 'Hi!' to *YOUR_NUMBER*” ## Installation & Setup -Before getting started, make sure you have installed FastAgency with support for the [AutoGen](https://microsoft.github.io/autogen){target="_blank"} runtime by running the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, make sure you have installed FastAgency with support for the [AutoGen](https://microsoft.github.io/autogen){target="_blank"} runtime by running the following command: ```bash pip install "fastagency[autogen]" @@ -23,8 +27,6 @@ pip install "fastagency[autogen]" This command installs FastAgency with support for the Console interface and [AutoGen](https://microsoft.github.io/autogen){target="_blank"} framework. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ### Creating your WhatsApp API key {! docs/en/tutorials/whatsapp/index.md[ln:49-76] !} diff --git a/docs/docs/en/user-guide/ui/console/basics.md b/docs/docs/en/user-guide/ui/console/basics.md index bdd21b1e..cd8bc4a5 100644 --- a/docs/docs/en/user-guide/ui/console/basics.md +++ b/docs/docs/en/user-guide/ui/console/basics.md @@ -6,7 +6,11 @@ Below is an example that demonstrates how to set up a simple learning conversati ## Installation -Before getting started, make sure you have installed FastAgency with support for the AutoGen runtime by running the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. Before getting started, make sure you have installed FastAgency with support for the AutoGen runtime by running the following command: ```bash pip install "fastagency[autogen]" @@ -14,8 +18,6 @@ pip install "fastagency[autogen]" This installation includes the AutoGen runtime, allowing you to build multi-agent workflows and integrate external APIs seamlessly. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Example: Student and Teacher Learning Chat This example demonstrates how to create a workflow where a student agent interacts with a teacher agent. The student asks questions, and the teacher provides responses, simulating a learning environment. The interaction is facilitated through the console using **[ConsoleUI](../../../../api/fastagency/ui/console/ConsoleUI.md)**. diff --git a/docs/docs/en/user-guide/ui/mesop/basics.md b/docs/docs/en/user-guide/ui/mesop/basics.md index 7e11aead..a2470bd4 100644 --- a/docs/docs/en/user-guide/ui/mesop/basics.md +++ b/docs/docs/en/user-guide/ui/mesop/basics.md @@ -71,7 +71,11 @@ Below, we’ll walk through the steps to set up a basic student-teacher conversa ## Installation -To install **FastAgency** with MesopUI support, use the following command: +We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. + +You can setup the project using Cookiecutter by following the [**project setup guide**](../../../user-guide/cookiecutter/index.md). + +Alternatively, you can use **pip + venv**. To install **FastAgency** with MesopUI support, use the following command: === "Without Authentication" @@ -87,8 +91,6 @@ To install **FastAgency** with MesopUI support, use the following command: This command ensures that the required dependencies for both **AutoGen** and **Mesop** are installed. -Alternatively, you can use [**Cookiecutter**](../../cookiecutter/index.md), which is the preferred method. Cookiecutter creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"}. - ## Usage You can simply create Mesop based UI by importing and instantiating the `MesopUI` class with no parameters: From 55e16ced46f94744fb8a1bcc3f3e485234da3eb9 Mon Sep 17 00:00:00 2001 From: Davor Runje Date: Mon, 11 Nov 2024 16:45:07 +0100 Subject: [PATCH 2/2] polishing (#557) --- docs/docs/SUMMARY.md | 1 - .../auth/firebase/firebase_auth/FirebaseConfig.md | 11 ----------- docs/docs/en/tutorials/mesop_template.md | 4 ++-- docs/docs/en/user-guide/getting-started/index.md | 2 +- fastagency/ui/mesop/auth/firebase/firebase_auth.py | 2 +- .../ui/mesop/auth/firebase/firebase_auth_component.py | 2 ++ scripts/build-docs.sh | 1 + 7 files changed, 7 insertions(+), 16 deletions(-) delete mode 100644 docs/docs/en/api/fastagency/ui/mesop/auth/firebase/firebase_auth/FirebaseConfig.md diff --git a/docs/docs/SUMMARY.md b/docs/docs/SUMMARY.md index 27d9e8cc..cef3cdbd 100644 --- a/docs/docs/SUMMARY.md +++ b/docs/docs/SUMMARY.md @@ -193,7 +193,6 @@ search: - [firebase_auth_component](api/fastagency/ui/mesop/auth/firebase/firebase_auth_component.md) - firebase_auth - [FirebaseAuth](api/fastagency/ui/mesop/auth/firebase/firebase_auth/FirebaseAuth.md) - - [FirebaseConfig](api/fastagency/ui/mesop/auth/firebase/firebase_auth/FirebaseConfig.md) - firebase_auth_component - [FirebaseConfig](api/fastagency/ui/mesop/auth/firebase/firebase_auth_component/FirebaseConfig.md) - [firebase_auth_component](api/fastagency/ui/mesop/auth/firebase/firebase_auth_component/firebase_auth_component.md) diff --git a/docs/docs/en/api/fastagency/ui/mesop/auth/firebase/firebase_auth/FirebaseConfig.md b/docs/docs/en/api/fastagency/ui/mesop/auth/firebase/firebase_auth/FirebaseConfig.md deleted file mode 100644 index 1e3f8e94..00000000 --- a/docs/docs/en/api/fastagency/ui/mesop/auth/firebase/firebase_auth/FirebaseConfig.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -# 0.5 - API -# 2 - Release -# 3 - Contributing -# 5 - Template Page -# 10 - Default -search: - boost: 0.5 ---- - -::: fastagency.ui.mesop.auth.firebase.firebase_auth.FirebaseConfig diff --git a/docs/docs/en/tutorials/mesop_template.md b/docs/docs/en/tutorials/mesop_template.md index 3d1f99de..880b0b5b 100644 --- a/docs/docs/en/tutorials/mesop_template.md +++ b/docs/docs/en/tutorials/mesop_template.md @@ -1,6 +1,6 @@ ## Project setup -We **strongly recommend** using [**Cookiecutter**](../cookiecutter/index.md) for setting up the project. It creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"} for development. +We **strongly recommend** using [**Cookiecutter**](../../user-guide/cookiecutter/index.md) for setting up the project. It creates the project folder structure, default workflow, automatically installs all the necessary requirements, and creates a [devcontainer](https://code.visualstudio.com/docs/devcontainers/containers){target="_blank"} that can be used with [Visual Studio Code](https://code.visualstudio.com/){target="_blank"} for development. You could also use virtual environment managers such as [venv](https://docs.python.org/3/library/venv.html){target="_blank"}, and a Python package manager, such as [pip](https://en.wikipedia.org/wiki/Pip_(package_manager)). @@ -93,7 +93,7 @@ You could also use virtual environment managers such as [venv](https://docs.pyth !!! info - If you used a different `project_slug` than the default `my_fastagency_app` this will be reflected in the project module naming. Keep this in mind when running the commands further in this guide (in [Run Application](#run-application)), you will need to replace `my_fastagency_app` with your `project_slug` name. + If you used a different `project_slug` than the default `my_fastagency_app` this will be reflected in the project module naming. Keep this in mind when running the commands further in this guide (in [Run Application](#running-the-application)), you will need to replace `my_fastagency_app` with your `project_slug` name. === "env + pip" diff --git a/docs/docs/en/user-guide/getting-started/index.md b/docs/docs/en/user-guide/getting-started/index.md index daaf139d..f2e58c99 100644 --- a/docs/docs/en/user-guide/getting-started/index.md +++ b/docs/docs/en/user-guide/getting-started/index.md @@ -42,7 +42,7 @@ You could also use virtual environment managers such as [venv](https://docs.pyth {! docs/en/user-guide/cookiecutter/index.md[ln:6-226] !} !!! info - If you used a different `project_slug` than the default `my_fastagency_app` this will be reflected in the project module naming. Keep this in mind when running the commands further in this guide (in [Run Application](#run-application)), you will need to replace `my_fastagency_app` with your `project_slug` name. + If you used a different `project_slug` than the default `my_fastagency_app` this will be reflected in the project module naming. Keep this in mind when running the commands further in this guide (in [Run Application](#run-application-locally)), you will need to replace `my_fastagency_app` with your `project_slug` name. ----- ## Workflow Development diff --git a/fastagency/ui/mesop/auth/firebase/firebase_auth.py b/fastagency/ui/mesop/auth/firebase/firebase_auth.py index 4535dff5..d5fd90b0 100644 --- a/fastagency/ui/mesop/auth/firebase/firebase_auth.py +++ b/fastagency/ui/mesop/auth/firebase/firebase_auth.py @@ -11,7 +11,7 @@ from ...styles import MesopHomePageStyles from .firebase_auth_component import FirebaseConfig, firebase_auth_component -__all__ = ["FirebaseConfig"] +__all__ = ["FirebaseAuth"] if typing.TYPE_CHECKING: from ..auth import AuthProtocol diff --git a/fastagency/ui/mesop/auth/firebase/firebase_auth_component.py b/fastagency/ui/mesop/auth/firebase/firebase_auth_component.py index 4278335c..9eacac7e 100644 --- a/fastagency/ui/mesop/auth/firebase/firebase_auth_component.py +++ b/fastagency/ui/mesop/auth/firebase/firebase_auth_component.py @@ -3,6 +3,8 @@ import mesop.labs as mel +__all__ = ["firebase_auth_component"] + MEL_WEB_COMPONENT_PATH = ( "/__fast_agency_internal__/javascript/firebase_auth_component.js" ) diff --git a/scripts/build-docs.sh b/scripts/build-docs.sh index 299096c2..d4c1e788 100755 --- a/scripts/build-docs.sh +++ b/scripts/build-docs.sh @@ -18,4 +18,5 @@ cd docs/docs_src/getting_started && \ # build docs +rm -rf docs/docs/en/api docs/docs/en/cli cd docs; python docs.py build