Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
zachgiordano committed Sep 20, 2024
1 parent 8c7e567 commit 0404f07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/griptape-cloud/structures/run-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@

Once your Structure is created and deployed, you can run your Structure one of three ways outlined below. You may view the details of any of your runs, no matter how you created them, in the `Runs` tab of your Structure.

To learn more about Structure Run details and output, look at the [Structure Run Events](./structure-run-events.md) documentations.
To learn more about Structure Run details and output, look at the [Structure Run Events](./structure-run-events.md) documentation.

## From the Cloud Console

In the cloud console, 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 cloud console, pass each new argument on a new line. For example if your local code is ran with the inputs `-i input_file.txt` then the arguments you would pass in the cloud would be:

```shell
```bash
-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.
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.

Expand Down
4 changes: 2 additions & 2 deletions docs/griptape-cloud/structures/structure-run-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ Example Event body:

### User Events

User Events are any Events emitted by your Structure code to the Events API. The recommended approach for emitting those Events is to make use of the
`USER` Events are any Events emitted by your Structure code to the Events API. The recommended approach for emitting those Events is to make use of the
[Griptape Cloud Event Listener Driver](../../griptape-framework/drivers/event-listener-drivers.md#griptape-cloud) in the Griptape framework.

For a full example of Structure code that makes use of that driver, refer to the [Managed Structure Template](https://github.com/griptape-ai/managed-structure-template/blob/main/structure.py).

#### Structure Run Output

In order for Griptape Cloud to populate the `output` field for your Structure Run, there needs to be a `USER` Event of type `FinishStructureRunEvent`.
In order for Griptape Cloud to populate the `output` field for your Structure Run, you must send a `USER` Event of type `FinishStructureRunEvent`.

By using the Griptape Cloud Event Listener Driver and an [Event Bus](../../griptape-framework/misc/events.md) that emits that Event type in your Structure code, the Cloud will automatically populate your Structure Run's output.

Expand Down

0 comments on commit 0404f07

Please sign in to comment.