Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trello and supabase tools #2

Merged
merged 2 commits into from
Aug 11, 2024
Merged

Add trello and supabase tools #2

merged 2 commits into from
Aug 11, 2024

Conversation

StrongMonkey
Copy link
Contributor

No description provided.

@StrongMonkey StrongMonkey requested a review from g-linville August 9, 2024 19:56
@StrongMonkey StrongMonkey force-pushed the add-trello-supabase branch 8 times, most recently from 2af2113 to b8dca85 Compare August 9, 2024 23:08
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be renamed to openapi.json

Comment on lines 1 to 5
Name: Supabase API(Read)
Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Description: Allows user to run supabase API with read operations
Tools: v1-get* from ./openapi.yaml
Tools: v1-list* from ./openapi.yaml

You are a helpful assistant helping me nagivating supabase openapi docs and give me instructions to how to use their api.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating an assistant for the user, we should distribute this as a set of tools, like this:

Suggested change
Name: Supabase API(Read)
Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Description: Allows user to run supabase API with read operations
Tools: v1-get* from ./openapi.yaml
Tools: v1-list* from ./openapi.yaml
You are a helpful assistant helping me nagivating supabase openapi docs and give me instructions to how to use their api.
Name: Supabase API (Read)
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please provide your Supabase API key (instructions [here](https://supabase.com/docs/reference/api/introduction))" as message and key as field
Share Tools: v1-get* from ./openapi.json
Share Tools: v1-list* from ./openapi.json

This is better because it allows the user to include these tools along with whatever else they want, and set the prompt however they would like.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it need description though?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be renamed to openapi.json

Comment on lines 1 to 6
Name: Supabase API(Read-Write)
Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Description: Allows user to run supabase API with read and write operations
Tools: * from ./openapi.yaml

You are a helpful assistant helping me nagivating supabase openapi docs and give me instructions to how to use their api.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same idea here:

Suggested change
Name: Supabase API(Read-Write)
Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Description: Allows user to run supabase API with read and write operations
Tools: * from ./openapi.yaml
You are a helpful assistant helping me nagivating supabase openapi docs and give me instructions to how to use their api.
Name: Supabase API (Read-Write)
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please provide your Supabase API key (instructions [here](https://supabase.com/docs/reference/api/introduction))" as message and key as field
Share Tools: openapi.json

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted description and changed to Share Credential and Share Tools

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This README can probably be deleted as it doesn't really provide much information.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend changing this to match how Taylor set up the tools for other CLIs in this repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah changed 👍

Comment on lines 1 to 27
# Gptscript with Supabase API

Welcome to the Gptscript project! This guide will help you understand how to use Gptscript to interact with Supabase APIs.

## Overview

Gptscript is a friendly assistant designed to help you with DevOps-related tasks using CLI programs. In this project, Gptscript is configured to assist with Supabase API operations.

## Prerequisites

Before you begin, ensure you have the following:

- [Supabase API key](https://supabase.com/docs/reference/api/introduction)

### Available Tools

- **Read Operations:**

- File: `read-only/tool.gpt`
- Description: Helps with read operations in Supabase API.
- Tools: `v1-get*`, `v1-list*` from `openapi.yaml`.

- **Read-Write Operations:**

- File: `read-write/tool.gpt`
- Description: Helps with read and write operations in Supabase API.
- Tools: All the tools from `openapi.yaml`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Gptscript with Supabase API
Welcome to the Gptscript project! This guide will help you understand how to use Gptscript to interact with Supabase APIs.
## Overview
Gptscript is a friendly assistant designed to help you with DevOps-related tasks using CLI programs. In this project, Gptscript is configured to assist with Supabase API operations.
## Prerequisites
Before you begin, ensure you have the following:
- [Supabase API key](https://supabase.com/docs/reference/api/introduction)
### Available Tools
- **Read Operations:**
- File: `read-only/tool.gpt`
- Description: Helps with read operations in Supabase API.
- Tools: `v1-get*`, `v1-list*` from `openapi.yaml`.
- **Read-Write Operations:**
- File: `read-write/tool.gpt`
- Description: Helps with read and write operations in Supabase API.
- Tools: All the tools from `openapi.yaml`.
# Supabase API Tools
This folder contains tools for GPTScript to interact with the Supabase API.
## Prerequisites
Before you begin, make sure you have a Supabase API key. The instructions for creating one are [here](https://supabase.com/docs/reference/api/introduction).
## Available Tools
- github.com/gptscript-ai/tools/apis/supabase/read-only
- This is a set of tools that can read information from the Supabase API, but will not change anything.
- github.com/gptscript-ai/tools/apis/supabase/read-write
- This is a broader set of tools that can read, write, and delete things in the Supabase API.

Comment on lines 1 to 13
Name: Trello API
Credential: trello-api-key as api.trello.comAPIKey
Credential: github.com/gptscript-ai/credential as api.trello.comAPIToken with GPTSCRIPT_API_TRELLO_COM_APITOKEN as env and "Please go to [here](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=ef4fde9fd7f65a15c74322f7546e4dee) to authenticate and provide your trello API token" as message and key as field
Description: Allow user to run Trello API to manage their boards and cards
Tools: *boards* from ./openapi.json
Tools: *cards* from ./openapi.json
Tools: *organizations* from ./openapi.json

You are a helpful assistant helping me running trello API. Give me a bried rundown on what you can do on trello API based on the trello related tools you have. Do not list the tools that you don't have in this context.

Before running sys-openapi tool, give an explaination on what it can do.
When asked to get current org. use "me" as id.
For other case, use the id from the context or ask user to provide ID.

---
Name: trello-api-key

#!/usr/bin/env bash

echo "{\"env\":{\"GPTSCRIPT_API_TRELLO_COM_APIKEY\":\"ef4fde9fd7f65a15c74322f7546e4dee\"}}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Name: Trello API
Credential: trello-api-key as api.trello.comAPIKey
Credential: github.com/gptscript-ai/credential as api.trello.comAPIToken with GPTSCRIPT_API_TRELLO_COM_APITOKEN as env and "Please go to [here](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=ef4fde9fd7f65a15c74322f7546e4dee) to authenticate and provide your trello API token" as message and key as field
Description: Allow user to run Trello API to manage their boards and cards
Tools: *boards* from ./openapi.json
Tools: *cards* from ./openapi.json
Tools: *organizations* from ./openapi.json
You are a helpful assistant helping me running trello API. Give me a bried rundown on what you can do on trello API based on the trello related tools you have. Do not list the tools that you don't have in this context.
Before running sys-openapi tool, give an explaination on what it can do.
When asked to get current org. use "me" as id.
For other case, use the id from the context or ask user to provide ID.
---
Name: trello-api-key
#!/usr/bin/env bash
echo "{\"env\":{\"GPTSCRIPT_API_TRELLO_COM_APIKEY\":\"ef4fde9fd7f65a15c74322f7546e4dee\"}}"
Name: Trello API
Share Credential: trello-api-key as api.trello.comAPIKey
Share Credential: github.com/gptscript-ai/credential as api.trello.comAPIToken with GPTSCRIPT_API_TRELLO_COM_APITOKEN as env and "Please go to [Trello](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=ef4fde9fd7f65a15c74322f7546e4dee) to create API token and provide it here" as message and key as field
Share Tools: *boards* from ./openapi.json
Share Tools: *cards* from ./openapi.json
Share Tools: *organizations* from ./openapi.json
---
Name: trello-api-key
#!/usr/bin/env bash
echo "{\"env\":{\"GPTSCRIPT_API_TRELLO_COM_APIKEY\":\"ef4fde9fd7f65a15c74322f7546e4dee\"}}"

Comment on lines 1 to 61
# Trello API Tool

This project provides a set of tools to interact with the Trello API, making it easier to manage your Trello boards, cards, and organizations.

## Getting Started

### Prerequisites

To use this tool, you need to have the following credentials:

1. **Trello API Token**: You need to authenticate and generate a token using the following URL:
```
https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=aabf1a5f6af0a2e5c4c3807b4d3ccbc8
```
You will be automatically prompted for this information when you are running the tool.

### Quick Start

```bash
gptscript github.com/gptscript-ai/trello-assistant
```

### Tools

The following tools are examples that available to interact with the Trello API:

- **post-cards**: Create new cards on a Trello board.
- **delete-cards-id**: Delete a card by its ID.
- **get-boards-id-cards**: Retrieve all cards on a specific board.
- **get-organizations-id-boards**: Retrieve all boards in a specific organization.
- **get-members-id-organizations**: Retrieve all organizations a member belongs to.

You can use all the API availiable in openapi.yaml as long as you know the operationID. For more details, check [here](https://docs.gptscript.ai/examples/api)

### Usage Examples

You can use these tools to perform various actions on your Trello account. Below are some examples:

#### Create a New Card

To create a new card on a Trello board, use the `post-cards` tool. You will need to provide the board ID and the card details.

#### Delete a Card

To delete a card by its ID, use the `delete-cards-id` tool. You will need to provide the card ID.

#### Retrieve All Cards on a Board

To retrieve all cards on a specific board, use the `get-boards-id-cards` tool. You will need to provide the board ID.

#### Retrieve All Boards in an Organization

To retrieve all boards in a specific organization, use the `get-organizations-id-boards` tool. You will need to provide the organization ID.

#### Retrieve All Organizations a Member Belongs To

To retrieve all organizations a member belongs to, use the `get-members-id-organizations` tool. You will need to provide the member ID. To get the current user's organizations, use "me" as the ID.

## Contributing

If you would like to contribute to this project, please fork the repository and submit a pull request.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Trello API Tool
This project provides a set of tools to interact with the Trello API, making it easier to manage your Trello boards, cards, and organizations.
## Getting Started
### Prerequisites
To use this tool, you need to have the following credentials:
1. **Trello API Token**: You need to authenticate and generate a token using the following URL:
```
https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=aabf1a5f6af0a2e5c4c3807b4d3ccbc8
```
You will be automatically prompted for this information when you are running the tool.
### Quick Start
```bash
gptscript github.com/gptscript-ai/trello-assistant
```
### Tools
The following tools are examples that available to interact with the Trello API:
- **post-cards**: Create new cards on a Trello board.
- **delete-cards-id**: Delete a card by its ID.
- **get-boards-id-cards**: Retrieve all cards on a specific board.
- **get-organizations-id-boards**: Retrieve all boards in a specific organization.
- **get-members-id-organizations**: Retrieve all organizations a member belongs to.
You can use all the API availiable in openapi.yaml as long as you know the operationID. For more details, check [here](https://docs.gptscript.ai/examples/api)
### Usage Examples
You can use these tools to perform various actions on your Trello account. Below are some examples:
#### Create a New Card
To create a new card on a Trello board, use the `post-cards` tool. You will need to provide the board ID and the card details.
#### Delete a Card
To delete a card by its ID, use the `delete-cards-id` tool. You will need to provide the card ID.
#### Retrieve All Cards on a Board
To retrieve all cards on a specific board, use the `get-boards-id-cards` tool. You will need to provide the board ID.
#### Retrieve All Boards in an Organization
To retrieve all boards in a specific organization, use the `get-organizations-id-boards` tool. You will need to provide the organization ID.
#### Retrieve All Organizations a Member Belongs To
To retrieve all organizations a member belongs to, use the `get-members-id-organizations` tool. You will need to provide the member ID. To get the current user's organizations, use "me" as the ID.
## Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request.
# Trello API Tool
This is a set of GPTScript tools to interact with the Trello API.
## Prerequisite
You need generate a Trello API token [here](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=aabf1a5f6af0a2e5c4c3807b4d3ccbc8). You will be automatically prompted for this information when you are running the tool.
## Quick Start
Create a new file called `agent.gpt` with this as the contents:

Tools: github.com/gptscript-ai/tools/apis/trello
Chat: true

Please help me with my Trello workspace.


Then, run it with `gptscript agent.gpt`. You will be prompted for your API key, and after providing it, you will be able to chat with the large language model and have it perform actions for you in Trello.

## Tools

These are some of the tools available to the LLM when you use this tool set:

- **post-cards**: Create new cards on a Trello board.
- **delete-cards-id**: Delete a card by its ID.
- **get-boards-id-cards**: Retrieve all cards on a specific board.
- **get-organizations-id-boards**: Retrieve all boards in a specific organization.
- **get-members-id-organizations**: Retrieve all organizations a member belongs to.

Signed-off-by: Daishan Peng <[email protected]>
Name: Supabase CLI
Type: context
Share Tools: sys.exec
Description: Helps user to interacte with supabase CLI
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Description: Helps user to interacte with supabase CLI
Description: Helps user interact with the supabase CLI

Please help me with my Trello workspace.
```

Then, run it with `gptscript agent.gpt`. You will be prompted for your API key, and after providing it, you will be able to chat with the large language model and have it perform actions for you in Trello.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Then, run it with `gptscript agent.gpt`. You will be prompted for your API key, and after providing it, you will be able to chat with the large language model and have it perform actions for you in Trello.
Then, run it with `gptscript agent.gpt`. You'll be prompted to enter your API key; once you provide it, you'll be able to chat with the large language model and have it perform actions for you in Trello.

@@ -0,0 +1,3 @@
Name: Supabase API(Read-Write)
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please read the instructions [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field

@@ -0,0 +1,5 @@
Name: Supabase API(Read)
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please go to instruction [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field
Share Credential: github.com/gptscript-ai/credential as api.supabase.combearer with GPTSCRIPT_API_SUPABASE_COM_BEARER as env and "Please read the instructions [here](https://supabase.com/docs/reference/api/introduction) and provide your supabase API key" as message and key as field

@@ -0,0 +1,13 @@
Name: Trello API
Share Credential: trello-api-key as api.trello.comAPIKey
Share Credential: github.com/gptscript-ai/credential as api.trello.comAPIToken with GPTSCRIPT_API_TRELLO_COM_APITOKEN as env and "Please go to [here](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=ef4fde9fd7f65a15c74322f7546e4dee) to authenticate and provide your trello API token" as message and key as field
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Share Credential: github.com/gptscript-ai/credential as api.trello.comAPIToken with GPTSCRIPT_API_TRELLO_COM_APITOKEN as env and "Please go to [here](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=ef4fde9fd7f65a15c74322f7546e4dee) to authenticate and provide your trello API token" as message and key as field
Share Credential: github.com/gptscript-ai/credential as api.trello.comAPIToken with GPTSCRIPT_API_TRELLO_COM_APITOKEN as env and "Please go [here](https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&key=ef4fde9fd7f65a15c74322f7546e4dee) to authenticate and provide your trello API token" as message and key as field

Signed-off-by: Daishan Peng <[email protected]>
@StrongMonkey StrongMonkey requested a review from drpebcak August 10, 2024 21:26
@StrongMonkey StrongMonkey merged commit 4eb9581 into main Aug 11, 2024
@ibuildthecloud ibuildthecloud deleted the add-trello-supabase branch October 30, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants