-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
68 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Data Sources | ||
|
||
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/create-knowledge-base.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. | ||
|
||
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 `[email protected]`. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Refresh a Data Source | ||
|
||
## Automatic Refresh | ||
|
||
By default your Data Source will not refresh automatically. When creating a Data Source, you can enable automatic refresh and specify a [CRON expression](https://crontab.guru/). For example, if you wish your Data Source to refresh every day at midnight you can use the following expression: `0 0 * * *`. | ||
|
||
## 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 | ||
export GT_CLOUD_API_KEY=<your API key here> | ||
export DATA_SOURCE_ID=<your data source id here> | ||
curl -H "Authorization: Bearer ${GT_CLOUD_API_KEY}" --json '{}' https://cloud.griptape.ai/api/data-connectors/${DATA_SOURCE_ID}/data-jobs | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 7 additions & 15 deletions
22
docs/griptape-cloud/knowledge-bases/index.md → ...e-cloud/knowledge-bases/accessing-data.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,33 @@ | ||
# Knowledge Bases | ||
# Accessing Data in a Knowledge Base | ||
|
||
Use [Knowledge Bases](https://cloud.griptape.ai/knowledge-bases) to prep your data ingested from [Data Sources](../data-sources/index.md) for retrieval. | ||
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. | ||
|
||
## 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 | ||
## From the UI | ||
|
||
You can try out both actions from the UI on the `Test` tab of your Knowledge Base. | ||
|
||
### From the API | ||
## 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. | ||
|
||
The following example commands will send the query string "test query string" and return the results from the Knowledge Base. | ||
|
||
#### Query | ||
### Query | ||
|
||
```shell | ||
export GT_CLOUD_API_KEY=<your API key here> | ||
export KNOWLEDGE_BASE_ID=<your knowledge base id here> | ||
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 | ||
### Search | ||
|
||
```shell | ||
export GT_CLOUD_API_KEY=<your API key here> | ||
export KNOWLEDGE_BASE_ID=<your knowledge base id here> | ||
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 | ||
## Using the Griptape Framework | ||
|
||
You can use [VectorStoreDrivers](../../griptape-framework/drivers/vector-store-drivers.md/#griptape-cloud-knowledge-base) to query your Knowledge Base with Griptape. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Knowledge Bases | ||
|
||
Use [Knowledge Bases](https://cloud.griptape.ai/knowledge-bases) to prep your data ingested from [Data Sources](../data-sources/create-data-source.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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Structures | ||
|
||
Use [Structures](https://cloud.griptape.ai/structures) to host any python code in the cloud. | ||
|
||
## Create a Structure | ||
|
||
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 | ||
- Be sure to allow the app access to `All Repositories` or select the specific repositories you need | ||
|
||
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 | ||
|
||
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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters