Skip to content

Commit

Permalink
Merge pull request #13 from jcooper-salt/api-discord-updates
Browse files Browse the repository at this point in the history
API & Discord revisions
  • Loading branch information
scottbaggett authored Jun 20, 2024
2 parents 55fd0a9 + da0cbe8 commit b4dd719
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions docs/deploy-to-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
### Example cURL request

```
curl -X POST --location "<https://salt-api-dev.getsalt.ai/api/v1/deployments/7824a62e-8222-454d-9ef4-bf1c7746fed4/executions/>" \\
-H "Content-Type: application/json" \\
curl -X POST --location "<https://salt-api-dev.getsalt.ai/api/v1/deployments/7824a62e-8222-454d-9ef4-bf1c7746fed4/executions/>"
-H "Content-Type: application/json"
-d '{ "callback": "<CALLBACK URL>" }'
```

Expand Down Expand Up @@ -52,7 +52,7 @@ When the CURL command and the respective object are executed, you will receive t

## SaltInput node

The `SaltInput` node is an official node developed by the Salt team. Each one present in the workflow allows you to expose input parameters for the end user to interact with.
The `SaltInput` node allows you to expose input parameters for end-user interaction within your workflow. Each one represents an input property in the `workflow_input` object of your API call's request body.

<aside>
ℹ️ It is recommended to give each SaltInput node a unique name for easier reference when constructing your request body. If a node is unnamed, it will be named by its node id number, e.g. "14".
Expand All @@ -66,7 +66,7 @@ The `SaltInput` node is an official node developed by the Salt team. Each one pr

## Receiving a response via webhook

As workflow run time can vary from seconds to minutes, the output will not be available immediately. To retrieve the final result, make sure to provide a `<CALLBACK URL>` webhook in the request body for us to call when the results are ready.
Workflow run times can vary from seconds to minutes. To manage this, Salt delivers results asynchronously via a webhook. Provide a callback URL to receive the final results once they are ready.

### Example response

Expand Down
4 changes: 2 additions & 2 deletions docs/deploy-to-discord.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ In any server with the Salt AI bot added, use the `/workflows` command to open t

![discord3](images/discord3.png)

Once your workflow is selected, click `Run workflow` to execute it. You can then fill in the workflow's input values, one for each SaltInput node in your workflow. Enter your string & integer values and click `Submit`. If the workflow has image or file attachments, you will be prompted to upload them in your direct messages.
Once your workflow is selected, click `Run workflow` to execute it. You can then fill in the workflow's input values, one for each `SaltInput` node in your workflow. Enter your string & integer values and click `Submit`. If the workflow has image or file attachments, you will be prompted to upload them in your direct messages.
Once the required inputs are filled in, your workflow will execute, and the outputs will appear in the thread or channel where you posted your message when they are finished generating.

![discord4](images/discord4.png)
Expand All @@ -45,7 +45,7 @@ Then, head to the **[#flow-catalog](https://discord.gg/FcbmPDf3E7)** channel and

## Troubleshooting errors

Sometimes, executions can fail based on errors in the workflow, such as invalid API keys. To fix this, you may have to make adjustments to the workflow, or get in touch with our support team for help.
Sometimes, executions can fail based on errors in the workflow, such as invalid API keys. To fix this, you may have to make adjustments to the workflow, or [get in touch with our support team](https://discord.com/channels/1151592612525002822/1212167911771217961) for help.
Connection errors may also result in failed generation, or results that won't return even if the workflow is valid. In this case, you can `right-click` (or tap-hold on mobile) > `Apps` and select `Retry`. The execution will be run again, and could return a successful result if the issue was related to connection.

## Need help?
Expand Down
10 changes: 5 additions & 5 deletions docs/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ You can quickly delete nodes by holding down CTRL CMD A to select all, then dele

Salt requires the use of special input and output nodes in every workflow. The **[SaltInput node](https://docs.getsalt.ai/md/SaltAI/Nodes/SaltInput/)** is required for passing an input into a workflow. The **[SaltOutput node](https://docs.getsalt.ai/md/SaltAI/Nodes/SaltOutput/)** is required in order to render an output (i.e. for all workflows).

More on working with SaltInput and SaltOutput nodes in the video below.
More on working with `SaltInput` and `SaltOutput` nodes in the video below.

[https://drive.google.com/file/d/1CXSp4sypP9J0rbMztFE84VSg6Z8gq\_-E/view?usp=drive_link](https://drive.google.com/file/d/1CXSp4sypP9J0rbMztFE84VSg6Z8gq_-E/view?usp=drive_link)

Expand Down Expand Up @@ -46,11 +46,11 @@ Workflows automatically save as you go. You can find, open, and edit all of your

## Preparing your workflow for deployment

You can see a workflow’s inputs and outputs at the bottom of the screen. These count the number of SaltInput & SaltOutput nodes, which are the parameters exposed to the user when they run your deployed workflow through our API (currently the Salt Discord integration).
You can see a workflow’s inputs and outputs at the bottom of the screen. These count the number of `SaltInput` & `SaltOutput` nodes, which are the parameters exposed to the user when they run your deployed workflow through our API (currently the Salt Discord integration).

![workflows7](images/workflows7.png)

Use a SaltInput node for every parameter you want to expose to users who will be able to run your workflow, such as text inputs, seed number inputs, or an uploaded image or file.
Use a `SaltInput` node for every parameter you want to expose to users who will be able to run your workflow, such as text inputs, seed number inputs, or an uploaded image or file.

You can use these in place of LoadImage nodes, or text boxes.

Expand All @@ -61,11 +61,11 @@ You can use these in place of LoadImage nodes, or text boxes.

</aside>

You can plug a SaltInput node in place of a text box or node parameter by right-clicking the node and converting it to an input.
You can plug a `SaltInput` node in place of a text box or node parameter by right-clicking the node and converting it to an input.

![workflows9](images/workflows9.png)

Your outputs can be configured using SaltOutput nodes, which is where you are able to specify your file types & frame rate. Each node can handle batch outputs, and you can have multiple nodes with different file types. It can help to name your outputs to differentiate them.
Your outputs can be configured using `SaltOutput` nodes, which is where you are able to specify your file types & frame rate. Each node can handle batch outputs, and you can have multiple nodes with different file types. It can help to name your outputs to differentiate them.

![workflows10](images/workflows10.png)

Expand Down

0 comments on commit b4dd719

Please sign in to comment.