diff --git a/, b/, new file mode 100644 index 0000000000..e69de29bb2 diff --git a/docs/deployment/agents/bigquery.rst b/docs/deployment/agents/bigquery.rst index d706ac7c37..d3e4ee490e 100644 --- a/docs/deployment/agents/bigquery.rst +++ b/docs/deployment/agents/bigquery.rst @@ -103,4 +103,4 @@ Upgrade the Flyte Helm release and ```` with the name of your namespace (e.g., ``flyte``). -For BigQuery agent on the Flyte cluster, see `BigQuery agent `_. +For BigQuery agent on the Flyte cluster, see `BigQuery agent `_. diff --git a/docs/deployment/agents/chatgpt.rst b/docs/deployment/agents/chatgpt.rst new file mode 100644 index 0000000000..c3e5a490ea --- /dev/null +++ b/docs/deployment/agents/chatgpt.rst @@ -0,0 +1,138 @@ +.. _deployment-agent-setup-chatgpt: + +ChatGPT agent +================= + +This guide provides an overview of how to set up the ChatGPT agent in your Flyte deployment. +Please note that you have to set up the OpenAI API key in the agent server to to run ChatGPT tasks. + +Specify agent configuration +---------------------------- + +.. tabs:: + + .. group-tab:: Flyte binary + + Edit the relevant YAML file to specify the agent. + + .. code-block:: bash + + kubectl edit configmap flyte-sandbox-config -n flyte + + .. code-block:: yaml + :emphasize-lines: 7,11,16 + + tasks: + task-plugins: + enabled-plugins: + - container + - sidecar + - k8s-array + - agent-service + default-for-task-types: + - container: container + - container_array: k8s-array + - chatgpt: agent-service + + plugins: + agent-service: + supportedTaskTypes: + - chatgpt + + .. group-tab:: Flyte core + + Create a file named ``values-override.yaml`` and add the following configuration to it: + + .. code-block:: yaml + + configmap: + enabled_plugins: + # -- Tasks specific configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#GetConfig) + tasks: + # -- Plugins configuration, [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#TaskPluginConfig) + task-plugins: + # -- [Enabled Plugins](https://pkg.go.dev/github.com/flyteorg/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend + enabled-plugins: + - container + - sidecar + - k8s-array + - agent-service + default-for-task-types: + container: container + sidecar: sidecar + container_array: k8s-array + chatgpt: agent-service + plugins: + agent-service: + supportedTaskTypes: + - chatgpt + +Add the OpenAI API token +------------------------------- + +1. Install flyteagent pod using helm: + +.. code-block:: + + helm repo add flyteorg https://flyteorg.github.io/flyte + helm install flyteagent flyteorg/flyteagent --namespace flyte + +2. Get the base64 value of your OpenAI API token: + +.. code-block:: + + echo -n "" | base64 + +3. Edit the flyteagent secret: + + .. code-block:: bash + + kubectl edit secret flyteagent -n flyte + + .. code-block:: yaml + :emphasize-lines: 3 + + apiVersion: v1 + data: + flyte_openai_access_token: + kind: Secret + metadata: + annotations: + meta.helm.sh/release-name: flyteagent + meta.helm.sh/release-namespace: flyte + creationTimestamp: "2023-10-04T04:09:03Z" + labels: + app.kubernetes.io/managed-by: Helm + name: flyteagent + namespace: flyte + resourceVersion: "753" + uid: 5ac1e1b6-2a4c-4e26-9001-d4ba72c39e54 + type: Opaque + + +Upgrade the Flyte Helm release +------------------------------ + +.. tabs:: + + .. group-tab:: Flyte binary + + .. code-block:: bash + + helm upgrade flyteorg/flyte-binary -n --values + + Replace ```` with the name of your release (e.g., ``flyte-backend``), + ```` with the name of your namespace (e.g., ``flyte``), + and ```` with the name of your YAML file. + + .. group-tab:: Flyte core + + .. code-block:: bash + + helm upgrade flyte/flyte-core -n --values values-override.yaml + + Replace ```` with the name of your release (e.g., ``flyte``) + + and ```` with the name of your namespace (e.g., ``flyte``). + +For ChatGPT agent on the Flyte cluster, see `ChatGPT agent `_. diff --git a/docs/deployment/agents/databricks.rst b/docs/deployment/agents/databricks.rst index 3dbf7731c5..b21fab3c57 100644 --- a/docs/deployment/agents/databricks.rst +++ b/docs/deployment/agents/databricks.rst @@ -291,4 +291,4 @@ Wait for the upgrade to complete. You can check the status of the deployment pod kubectl get pods -n flyte -For Databricks agent on the Flyte cluster, see `Databricks agent `_. +For Databricks agent on the Flyte cluster, see `Databricks agent `_. diff --git a/docs/deployment/agents/index.md b/docs/deployment/agents/index.md index 0e114c8d06..7c7f3db92d 100644 --- a/docs/deployment/agents/index.md +++ b/docs/deployment/agents/index.md @@ -17,6 +17,8 @@ If you are using a managed deployment of Flyte, you will need to contact your de * - {ref}`Airflow Agent ` - Configuring your Flyte deployment for the Airflow agent +* - {ref}`ChatGPT Agent ` + - Configuring your Flyte deployment for the ChatGPT agent. * - {ref}`Databricks Agent ` - Configuring your Flyte deployment for the Databricks agent. * - {ref}`Google BigQuery Agent ` @@ -33,6 +35,7 @@ If you are using a managed deployment of Flyte, you will need to contact your de :hidden: airflow +chatgpt databricks bigquery mmcloud diff --git a/docs/deployment/agents/mmcloud.rst b/docs/deployment/agents/mmcloud.rst index ac08f4fcdf..422162af27 100644 --- a/docs/deployment/agents/mmcloud.rst +++ b/docs/deployment/agents/mmcloud.rst @@ -118,4 +118,4 @@ Wait for the upgrade to complete. You can check the status of the deployment pod kubectl get pods -n flyte -For MMCloud agent on the Flyte cluster, see `MMCloud agent `_. +For MMCloud agent on the Flyte cluster, see `MMCloud agent `_. diff --git a/docs/deployment/agents/snowflake.rst b/docs/deployment/agents/snowflake.rst index f4d82c0eb2..fe1c8482ae 100644 --- a/docs/deployment/agents/snowflake.rst +++ b/docs/deployment/agents/snowflake.rst @@ -100,4 +100,4 @@ Upgrade the Flyte Helm release and ```` with the name of your namespace (e.g., ``flyte``). -For Snowflake agent on the Flyte cluster, see `Snowflake agent `_. +For Snowflake agent on the Flyte cluster, see `Snowflake agent `_. diff --git a/monodocs-environment.yaml b/monodocs-environment.yaml index 140552aa2d..78f85c19cf 100644 --- a/monodocs-environment.yaml +++ b/monodocs-environment.yaml @@ -56,6 +56,7 @@ dependencies: - mlflow==2.7.0 # mlflow - snowflake-connector-python # snowflake - vaex-core # vaex + - openai # chatgpt - pip: - readthedocs-sphinx-ext