From 128d7d9814c9f169dc3b335b4eb8c1aabbd4f948 Mon Sep 17 00:00:00 2001 From: Emily Danielson Date: Mon, 26 Aug 2024 15:27:56 -0700 Subject: [PATCH] initial cloud docs for data sources, knowledge bases, and structures --- docs/griptape-cloud/data-sources/index.md | 21 ++++++++++ docs/griptape-cloud/index.md | 11 ++++- docs/griptape-cloud/knowledge-bases/index.md | 35 ++++++++++++++++ docs/griptape-cloud/structures/index.md | 44 ++++++++++++++++++++ docs/index.md | 2 +- mkdocs.yml | 9 +++- 6 files changed, 117 insertions(+), 5 deletions(-) create mode 100644 docs/griptape-cloud/data-sources/index.md create mode 100644 docs/griptape-cloud/knowledge-bases/index.md create mode 100644 docs/griptape-cloud/structures/index.md diff --git a/docs/griptape-cloud/data-sources/index.md b/docs/griptape-cloud/data-sources/index.md new file mode 100644 index 000000000..a9807cb11 --- /dev/null +++ b/docs/griptape-cloud/data-sources/index.md @@ -0,0 +1,21 @@ +# Data Sources + +Use [Data Sources](https://cloud.griptape.ai/data-sources) to connect and ingest your own data for use with your AI code. + +## Create a Data Source + +You can [Create a Data Source](https://cloud.griptape.ai/data-sources/create) by specifying the required configuration for your chosen data source. + +If you do not see a data source coniguration you'd wish to use, you can submit a request via Discord or `hello@griptape.ai`. + +## Refresh a Data Source + +By default your Data Source will not refresh automatically. You can enable automatic refresh and specify a CRON expression when creating a Data Source. + +For example, if you wish your Data Source to refresh every day at midnight you can use the following expression: `0 0 * * *`. + +If you wish to manually refresh a data source you can do so either via the `Refresh` button on the UI or by API using the `Data Source ID` on the `Config` tab. You will need a [Griptape Cloud API Key](https://cloud.griptape.ai/configuration/api-keys) to make API calls. + +```shell +curl -H "Authorization: Bearer ${GT_CLOUD_API_KEY}" --json '{}' https://cloud.griptape.ai/api/data-connectors/${data_source_id}/data-jobs +``` diff --git a/docs/griptape-cloud/index.md b/docs/griptape-cloud/index.md index 6c1c89b8b..054c09425 100644 --- a/docs/griptape-cloud/index.md +++ b/docs/griptape-cloud/index.md @@ -1,5 +1,12 @@ # Griptape Cloud -Griptape Cloud provides managed services for your AI app stack. Deploy and scale end-to-end solutions, from LLM-powered data prep and retrieval to AI agents, pipelines and workflows. +[Griptape Cloud](https://cloud.griptape.ai/) provides managed services for your AI app stack. Deploy and scale end-to-end solutions, from LLM-powered data prep and retrieval to AI Agents, Pipelines and Workflows. -To get started with AI Structures in the Cloud, check out the [managed-structure-template](https://github.com/griptape-ai/managed-structure-template) or deploy one of the [griptape-sample-structures](https://github.com/griptape-ai/griptape-sample-structures/tree/main). \ No newline at end of file +## Build Your Own RAG Pipeline +Connect to your data with our [Data Sources](data-sources/index.md) and prepare them for retrieval with [Knowledge Bases](knowledge-bases/index.md). + +## Host and Run Your Code +Have custom AI code? You can host your python code using [Structures](structures/index.md) whether it uses the Griptape Framework or not. + +## APIs +All of our features can be called via API. See the [API Reference](api/api-reference.md) for detailed information. diff --git a/docs/griptape-cloud/knowledge-bases/index.md b/docs/griptape-cloud/knowledge-bases/index.md new file mode 100644 index 000000000..604014c56 --- /dev/null +++ b/docs/griptape-cloud/knowledge-bases/index.md @@ -0,0 +1,35 @@ +# Knowledge Bases + +Use [Knowledge Bases](https://cloud.griptape.ai/knowledge-bases) to prep your data ingested from [Data Sources](../data-sources/index.md) for retrieval. + +## Create a Knowledge Base + +You can [create a Knowledge Base](https://cloud.griptape.ai/knowledge-bases/create) by specifying which Data Sources you wish to include. + +## Search or Query a Knowledge Base + +Once created you can `Search` or `Query` the Knowledge Base for information contained in your Data Sources. `Search` will return a natural language response while `Query` will return the individual entries. Use whichever one best fits your use case. + +### From the UI + +You can try out both actions from the UI on the `Test` tab of your Knowledge Base. + +### From the API + +You can enact both `Query` and `Search` via the API by hitting their respective endpoints using a [Griptape Cloud API Key](https://cloud.griptape.ai/configuration/api-keys) and the Knowledge Base ID found on the `Config` tab of your Knowledge Base. + +#### Query + +```shell +curl -H "Authorization: Bearer ${GT_CLOUD_API_KEY}" --json '{"query": "test query string"}' https://cloud.griptape.ai/api/knowledge-bases/${knowledge-base-id}/query +``` + +#### Search + +```shell +curl -H "Authorization: Bearer ${GT_CLOUD_API_KEY}" --json '{"query": "test query string"}' https://cloud.griptape.ai/api/knowledge-bases/${knowledge-base-id}/search +``` + +### Using the Griptape Framework + +You can use [VectorStoreDrivers](../../griptape-framework/drivers/vector-store-drivers/#griptape-cloud-knowledge-base) in the Griptape Framework to run your code. diff --git a/docs/griptape-cloud/structures/index.md b/docs/griptape-cloud/structures/index.md new file mode 100644 index 000000000..5978b19e9 --- /dev/null +++ b/docs/griptape-cloud/structures/index.md @@ -0,0 +1,44 @@ +# Structures + +Use [Structures](https://cloud.griptape.ai/structures) to host any python code in the cloud in seconds. + +## Create a Structure + +1. First [Connect Your GitHub Account](https://cloud.griptape.ai/account) +1. Install the [Griptape Cloud GitHub app](https://github.com/apps/griptape-cloud/installations/new/) to any account or organization you'd like to pull code in from + 1. Be sure to allow the app access to `All Repositories` or select the specific repositories you need + +You can then [create a Structure](https://cloud.griptape.ai/structures/create) by providing your GitHub repository information. Make sure that your repository has a [Structure Config YAML](structure-config.md). + +### Quickstart With Samples and Templates + +To get started with Structures in the Cloud, check out the [managed-structure-template](https://github.com/griptape-ai/managed-structure-template) or deploy one of the [griptape-sample-structures](https://github.com/griptape-ai/griptape-sample-structures/tree/main). + +## Run a Structure + +Once your Structure is created and deployed, you can run your Structure one of three ways outlined below. In order to view the output of any of your runs, no matter how you created them, you can view them in the `Runs` tab of your Structure. + +### From the UI + +In the UI, click on the name of the Structure you wish to run and then go to the `Test` tab. Here you can specify arguments to pass to your Structure run and any run-specific environment variables you need. + +When passing arguments through the UI, pass each new argument on a new line. For example if your local code could be ran with the inputs `-i input_file.txt` then the arguments you would pass in the cloud would be: + +``` +-i +input_file.txt +``` + +### From the API + +You can run your Structure via the API using CURL or any other code that can make HTTP requests. You will need a [Griptape Cloud API Key](https://cloud.griptape.ai/configuration/api-keys) and the `Structure Invocation URL` which is located on the `Config` tab of your Structure. + +```shell +curl -H "Authorization: Bearer ${GT_CLOUD_API_KEY}" --json '{"args": ["arg1"], "env": {"var1":"value1"}}' ${INVOCATION_URL} +``` + +For more information on other Structure run APIs, check out the [StructureRuns API docs](api/api-reference/#/StructureRuns). + +### Using the Griptape Framework + +You can use [StructureRunDrivers](../../griptape-framework/drivers/structure-run-drivers/#griptape-cloud) in the Griptape Framework to run your code. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 5d22224e7..2c6ee5d50 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,7 +8,7 @@ Griptape Topic Guides discuss key topics at a high level and provide useful back ### Griptape Cloud -[Griptape Cloud](griptape-cloud/api/api-reference.md) provides an overview of the APIs available in the managed cloud service. +[Griptape Cloud](griptape-cloud/index.md) provides an overview of the features in Griptape's cloud offering. ### Griptape Framework diff --git a/mkdocs.yml b/mkdocs.yml index 4207d2171..0d6d2fd26 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -77,10 +77,15 @@ nav: - Contributing: "contributing.md" - Cloud: - Overview: "griptape-cloud/index.md" + - Data Sources: + - Overview: "griptape-cloud/data-sources/index.md" + - Knowledge Bases: + - Overview: "griptape-cloud/knowledge-bases/index.md" + - Structures: + - Overview: "griptape-cloud/structures/index.md" + - Structure Config YAML: "griptape-cloud/structures/structure-config.md" - Cloud API: - API Reference: "griptape-cloud/api/api-reference.md" - - Structures: - - Structure Config: "griptape-cloud/structures/structure-config.md" - Framework: - Overview: "griptape-framework/index.md" - Structures: