diff --git a/docs/griptape-cloud/data-sources/index.md b/docs/griptape-cloud/data-sources/index.md index a9807cb11..359428e4a 100644 --- a/docs/griptape-cloud/data-sources/index.md +++ b/docs/griptape-cloud/data-sources/index.md @@ -1,21 +1,27 @@ # Data Sources -Use [Data Sources](https://cloud.griptape.ai/data-sources) to connect and ingest your own data for use with your AI code. +Use [Data Sources](https://cloud.griptape.ai/data-sources) to connect and ingest your own data for use with your AI applications via [Knowledge Bases](../knowledge-bases/index.md). ## 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. +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`. +If you do not see a data source configuration you'd wish to use, you can submit a request via [Discord](https://discord.gg/gnWRz88eym) 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. +### Automatic Refresh -For example, if you wish your Data Source to refresh every day at midnight you can use the following expression: `0 0 * * *`. +By default your Data Source will not refresh automatically. You can enable automatic refresh and specify a [CRON expression](https://crontab.guru/) 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. +### Manual Refresh + +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 and a [Griptape Cloud API Key](https://cloud.griptape.ai/configuration/api-keys). + +The following shell commands will create a new data refresh job. You will need to specify your API key and data source id. ```shell -curl -H "Authorization: Bearer ${GT_CLOUD_API_KEY}" --json '{}' https://cloud.griptape.ai/api/data-connectors/${data_source_id}/data-jobs +export GT_CLOUD_API_KEY= +export DATA_SOURCE_ID= +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 054c09425..421d2a04b 100644 --- a/docs/griptape-cloud/index.md +++ b/docs/griptape-cloud/index.md @@ -6,7 +6,7 @@ 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. +Have Griptape code? Have existing code with another LLM framework? 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. +All of our features can be called via API with a [Griptape Cloud API Key](https://cloud.griptape.ai/configuration/api-keys). 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 index 604014c56..a388c4ad3 100644 --- a/docs/griptape-cloud/knowledge-bases/index.md +++ b/docs/griptape-cloud/knowledge-bases/index.md @@ -16,20 +16,26 @@ You can try out both actions from the UI on the `Test` tab of your Knowledge Bas ### 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. +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. + +The following example commands will send the query string "test query string" and return the results from the 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 +export GT_CLOUD_API_KEY= +export KNOWLEDGE_BASE_ID= +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 +export GT_CLOUD_API_KEY= +export KNOWLEDGE_BASE_ID= +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. +You can use [VectorStoreDrivers](../../griptape-framework/drivers/vector-store-drivers.md/#griptape-cloud-knowledge-base) to query your Knowledge Base with Griptape. diff --git a/docs/griptape-cloud/structures/index.md b/docs/griptape-cloud/structures/index.md index 5978b19e9..17eff5c98 100644 --- a/docs/griptape-cloud/structures/index.md +++ b/docs/griptape-cloud/structures/index.md @@ -1,14 +1,14 @@ # Structures -Use [Structures](https://cloud.griptape.ai/structures) to host any python code in the cloud in seconds. +Use [Structures](https://cloud.griptape.ai/structures) to host any python code in the cloud. ## Create a Structure -1. First [Connect Your GitHub Account](https://cloud.griptape.ai/account) +1. [Connect Your GitHub Account](https://cloud.griptape.ai/account) in your Griptape Cloud 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 + - 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). +You can now [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 @@ -31,14 +31,18 @@ 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. +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. + +The example below will kick off a run with the args you pass as a json object. ```shell +export GT_CLOUD_API_KEY= +export INVOCATION_URL= 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). +For more information on other Structure run APIs, check out the [StructureRuns API docs](../api/api-reference.md/#/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 +You can use [StructureRunDrivers](../../griptape-framework/drivers/structure-run-drivers.md/#griptape-cloud) to run your Structure with Griptape.