Commit graph

18 commits

Author SHA1 Message Date
Nate Barbettini
0344bc79cb
Bump arcadepy dependency (#168)
`arcadepy` is now at [0.2.1 on
pypi](https://pypi.org/project/arcadepy/0.2.1/).
The SDK references `arcadepy` but it is locked to the `0.1.x` minor
release.
2024-12-03 07:18:18 -08:00
Eric Gustin
82afd7ec70
Update starlette dep via bumping FastAPI (#158)
Patches vulnerability that is due to starlette version < 0.40.0 by
bumping the fastAPI version to 0.115.3

FastAPI 0.115.3 release notes:
https://github.com/fastapi/fastapi/releases/tag/0.115.3
2024-11-19 09:17:28 -08:00
Nate Barbettini
3699b16b2d
fix: circular import in arcade.core (#137)
Fixes a circular import issue where `arcade.sdk -> arcade.core` but also
`arcade.core -> arcade.sdk`. My mistake!

Moved some of the shared classes down into `core`, and re-exported them
to `sdk` to keep the expected interface for devs.
2024-11-01 12:38:44 -07:00
Nate Barbettini
036ad54ac6
Remove arcade.core from all examples (#121)
This PR ensures that `arcade.core` does not show up anywhere in "user
space". This is crucial for helping developers understand what objects
are safe to use, and helps maintain a good developer experience.

Specific changes:
- `ToolAuthorizationContext` and `ToolContext` are now visible via
`arcade.sdk`
- `ToolCatalog` is now visible via `arcade.sdk`
- `Toolkit` is now visible via `arcade.sdk`
- `config` is now visible via `arcade.sdk.config`
2024-10-24 17:08:04 -07:00
Nate Barbettini
9d00295e33
Replace arcade.client with arcadepy (#119)
Closes: https://app.clickup.com/t/86b2k2962

---------

Co-authored-by: sdreyer <sterling@arcade-ai.com>
2024-10-23 15:29:02 -07:00
Sam Partee
f3feb85239
Fix small bugs in pyproject.tomls (#88)
```
authors = ["Arcade AI <dev@arcade-ai.com>"]
```
vs
```
authors = ["Arcade AI <dev@arcade-ai.com"]
```

There is also now a ``make`` command for ``make install-toolkits``
2024-10-04 12:08:03 -07:00
Nate Barbettini
799d376ae5
SDK: Generic OAuth 2.0 connector (#81)
- Implements https://app.clickup.com/t/86b1whxb3 on the SDK side
- - Corresponding Engine PR:
https://github.com/ArcadeAI/Engine/pull/113/files?w=1
- Updates existing toolkits with new syntax.
2024-10-03 16:40:02 -07:00
Nate Barbettini
894fa878f1
Fix ruff (#64)
On the last few PRs I have noticed two problems:
1. `ruff format` fails even though it seems OK on our local machines
(sometimes, not always)
2. Nate's and Sam's machines kept flip-flopping a specific piece of
formatting back and forth, indicating a subtle difference of config
hiding somewhere
3. This was reproducible by running `ruff format` in the terminal,
followed by `make check`. The former would edit files, and then `make
check` would edit them back!

This PR addresses both issues, and further standardizes our editor &
linter configs to be super stable.
Specifically:
1. The main fix for the above, the pre-commit hook was pinned to a super
old version of ruff.
This resulted in subtle differences in behavior between our machines,
and on CI.

2. Moved ruff settings from `pyproject.toml` to `.ruff.toml`
pyproject files in subdirectories (e.g. `toolkits/**`) were overriding
the main pyproject file and erasing the custom ruff config we set at the
root. This meant that our ruff config was applied to `arcade` but not to
any of the other packages.
By moving the config to `.ruff.toml` at the root, all projects will
inherit the same ruff linting & formatting config.

4. Un-ignored the `.vscode/` directory so that we can share
vscode/cursor workspace settings.
This is valuable for standardizing settings like the default formatter
(ruff) and default test framework (pytest).
However, it's important that going forward we _only_ commit things here
that should apply across all of our machines.

5. To avoid any conflict between prettier and ruff, prettier now
explicitly ignores *.py files

6. Finally, `ruff format` and `make check` agree. A number of files are
newly auto-formatted.
2024-09-25 09:47:30 -07:00
Nate Barbettini
c1a66a6170
SDK: Fully qualified tool names (#47)
In this PR:
- Handle and require fully-qualified tool names `Toolkit.ToolName` in
the actor

Also, unrelated changes/fixes:
- Cleaned up the logic around actor secrets and `$ARCADE_ACTOR_SECRET`
- Removes experimental Flask actor for now

Note: Must be merged along with
https://github.com/ArcadeAI/Engine/pull/87
2024-09-23 15:47:36 -07:00
Eric Gustin
53fa083efd
Add initial X toolkit, remove Github toolkit, rename math toolkit (#52)
* Renamed `arcade_arithmetic` to `arcade_math`
* Deleted `arcade_github` toolkit for the next release. This will be
reintroduced later.
* Added 5 tools to `arcade_x` toolkit
- post_tweet
- delete_tweet_by_id
- search_recent_tweets_by_username
- search_recent_tweets_by_keywords
- lookup_single_user_by_username
2024-09-23 13:42:22 -07:00
Eric Gustin
43198a3a9b
Add New Gmail Tools To The Google Toolkit (#41)
# PR Description

## Summary

Changes include renaming the `arcade_gmail` toolkit to `arcade_google`,
adding unit tests for Google toolkit, add new tools to the Google
toolkit.
## Changes

### Makefile
- Added a new `make test-toolkits` target to iterate over all toolkits
and run pytest on each one.

### Added new tools for the google toolkit

1. `send_email`
This tool sends an email using the Gmail API.

2. `write_draft_email`
This tool creates a draft email using the Gmail API. 

3. `update_draft_email`
This tool updates an existing draft email using the Gmail API.

4. `send_draft_email`
This tool sends a draft email using the Gmail API.

5. `delete_draft_email`
This tool deletes a draft email using the Gmail API. 

6. `list_draft_emails`
This tool retrieves a list of draft emails using the Gmail API.

7. `list_emails_by_header`
This tool searches for emails by a specific header using the Gmail API.
- `sender`: The sender's email address to search for.
- `limit`: The maximum number of emails to retrieve.

8. `list_emails`
This tool retrieves a list of emails using the Gmail API.

9. `trash_email`
This tool moves an email to the trash using the Gmail API.
2024-09-19 10:18:49 -07:00
Nate Barbettini
408f2e6300
gmail: search_emails_by_header tool (#28)
Adds a new gmail tool to search email, plus some cleanup.
2024-08-30 15:29:02 -07:00
Nate Barbettini
950e075750
arcade login in CLI (#25)
Working now:
- `arcade login` works against the Cloud
- `arcade logout` deletes your local credentials

---------

Co-authored-by: Sam Partee <sam@arcade-ai.com>
2024-08-30 11:20:00 -07:00
Nate Barbettini
07d9cca2ab
API key auth for Actors (#23)
Protects Actors by requiring the Engine to send a token signed with the
Arcade API key.

Also, updates the FastAPI example so the Arcade API key is sent to the
Engine in a chat request.
2024-08-28 17:15:24 -07:00
Nate Barbettini
ab703b75ef
Retryable errors (#20)
Co-authored-by: Sterling Dreyer <sdreyer@ucsc.edu>
2024-08-22 16:17:15 -07:00
Nate Barbettini
acba912816
Start Slack toolkit (#17)
- Start a Slack toolkit with a few tools
- Update Google auth
- Show user's email in `arcade chat`
2024-08-22 16:12:42 -07:00
Nate Barbettini
3154298572
GitHub toolkit (#16)
the changes needed in the SDK to handle tool auth,
 and multiple tool auth providers.
2024-08-21 19:22:46 -07:00
Sam Partee
35baaf0dc8
Pass ToolContext and CLI cleanup (#13)
Added
-  `arcade dev` - serves a simple fastapi actor
- `arcade config` - show/edit/change config in `~/.arcade`
- `arcade chat` - chat with LLM without toolcalls

Changed:
- `arcade show`, `arcade run` - can now use all installed toolkits

---------

Co-authored-by: Nate Barbettini <nate@arcade-ai.com>
2024-08-13 15:40:08 -07:00