Update README (#127)

This commit is contained in:
Sam Partee 2024-10-25 20:14:30 -07:00 committed by GitHub
parent 75b9ea8e91
commit 275a3d63b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 129 additions and 78 deletions

205
README.md
View file

@ -106,79 +106,141 @@ I starred the ArcadeAI/arcade-ai repo on Github for you!
You can use Ctrl-C to exit the chat at any time. You can use Ctrl-C to exit the chat at any time.
### Arcade Engine APIs ## Arcade Cloud
- **`/auth`**: Generic OAuth 2.0 flow for authorizing agents across many services Arcade Cloud is a hosted version of the Arcade AI engine that hosts a number of prebuilt toolkits for interacting with a variety of services.
- **`/tools`**: Manage, authorize, and execute tools. Tool-calling where the tools are **actually called**
- **`/chat`**: An OpenAI-compatible LLM API that enables tool execution with new `tool_choice` options:
1. `tool_choice='execute'`: Return the predicted tool call's output as content in the response
2. `tool_choice='generate'`: Generate a response informed by predicted tool call(s) execution.
See the full API spec [here](https://reference.arcade-ai.com). ### Prebuilt Toolkits
### Arcade Cloud Engine Arcade AI offers a number of prebuilt toolkits that can be used by agents to interact with a variety of services.
<img src="https://docs.arcade-ai.com/images/icons/github.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/gmail.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/google_calendar.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/google_docs.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/google_drive.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/serpapi.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/slack.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/web.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/twitter.png" alt="" width="30" height="30" style="vertical-align: top;" /> <table>
<br><br> <thead>
Arcade AI offers a number of prebuilt toolkits that can be used to interact with a variety of services. <tr>
<th style="text-align: center;">Service</th>
<th style="text-align: center;">Auth Type</th>
<th style="text-align: center;">Toolkit</th>
<th style="text-align: center;">Documentation</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/github.png" alt="GitHub" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/github">Github</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/github">GitHub Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/gmail.png" alt="Gmail" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/google/arcade_google/tools/gmail">Google</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/gmail">Gmail Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/google_calendar.png" alt="Google Calendar" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/google/arcade_google/tools/calendar">Google</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/google/calendar">Google Calendar Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/google_docs.png" alt="Google Docs" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/google/arcade_google/tools/docs">Google</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/google/docs">Google Docs Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/google_drive.png" alt="Google Drive" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/google/arcade_google/tools/drive">Google</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/google/drive">Google Drive Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/serpapi.png" alt="Search" width="30" /></td>
<td style="text-align: center;">API Key</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/search">Search</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/search">Search Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/slack.png" alt="Slack" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/slack">Slack</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/slack">Slack Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/web.png" alt="Web" width="30" /></td>
<td style="text-align: center;">API Key</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/web">Web</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/web">Web Toolkit Docs</a></td>
</tr>
<tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/twitter.png" alt="Twitter" width="30" /></td>
<td style="text-align: center;">OAuth</td>
<td style="text-align: center;"><a href="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/x">X</a></td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/toolkits/X">X Toolkit Docs</a></td>
</tr>
</tbody>
</table>
#### Calling tools directly <br>
```python ### Supported Auth Providers
from arcadepy import Arcade
client = Arcade() <table>
<thead>
USER_ID = "you@example.com" <tr>
TOOL_NAME = "Github.SetStarred" <th style="text-align: center;">Provider</th>
<th style="text-align: center;">Name</th>
# Perform User Authorization <th style="text-align: center;">Documentation</th>
auth_response = client.tools.authorize( </tr>
tool_name=TOOL_NAME, </thead>
user_id=USER_ID, <tbody>
) <tr>
if auth_response.status != "completed": <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/github.png" alt="GitHub" width="30" /></td>
print(f"Click this link to authorize: {auth_response.auth_url}") <td style="text-align: center;">github</td>
input("After you have authorized, press Enter to continue...") <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/github">GitHub Auth Docs</a></td>
</tr>
# Run the tool <tr>
inputs = {"owner": "ArcadeAI", "name": "Hello-World", "starred": True} <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/google.png" alt="Google" width="30" /></td>
response = client.tools.run( <td style="text-align: center;">google</td>
tool_name=TOOL_NAME, <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/google">Google Auth Docs</a></td>
inputs=inputs, </tr>
user_id=USER_ID, <tr>
) <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/linkedin.png" alt="LinkedIn" width="30" /></td>
print(response) <td style="text-align: center;">linkedin</td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/linkedin">LinkedIn Auth Docs</a></td>
``` </tr>
<tr>
#### Calling tools with the LLM API <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/msft.png" alt="Microsoft" width="30" /></td>
<td style="text-align: center;">microsoft</td>
```python <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/microsoft">Microsoft Auth Docs</a></td>
import os </tr>
from openai import OpenAI <tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/slack.png" alt="Slack" width="30" /></td>
USER_ID = "you@example.com" <td style="text-align: center;">slack</td>
PROMPT = "Star the ArcadeAI/arcade-ai repository." <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/slack">Slack Auth Docs</a></td>
TOOL_NAME = "Github.SetStarred" </tr>
# Use "generate" to have the LLM generate a response after the tool executes. Use 'execute' to get the tool's output directly. <tr>
TOOL_CHOICE = "generate" <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/spotify.png" alt="Spotify" width="30" /></td>
<td style="text-align: center;">spotify</td>
client = OpenAI( <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/spotify">Spotify Auth Docs</a></td>
base_url="https://api.arcade-ai.com", </tr>
api_key=os.environ.get("ARCADE_API_KEY")) <tr>
<td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/twitter.png" alt="X" width="30" /></td>
response = client.chat.completions.create( <td style="text-align: center;">x</td>
messages=[ <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/X">X Auth Docs</a></td>
{"role": "user", "content": PROMPT}, </tr>
], <tr>
model="gpt-4o-mini", <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/zoom.png" alt="Zoom" width="30" /></td>
user=USER_ID, <td style="text-align: center;">zoom</td>
tools=[TOOL_NAME], <td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/zoom">Zoom Auth Docs</a></td>
tool_choice=TOOL_CHOICE, </tr>
) <tr>
print(response.choices[0].message.content) <td style="text-align: center;"><img src="https://docs.arcade-ai.com/images/icons/oauth2.png" alt="OAuth 2.0" width="30" /></td>
``` <td style="text-align: center;">oauth2</td>
<td style="text-align: center;"><a href="https://docs.arcade-ai.com/integrations/auth/oauth-2.0">Generic OAuth2 Auth Docs</a></td>
</tr>
</tbody>
</table>
### Building Your Own Tools ### Building Your Own Tools
@ -190,17 +252,6 @@ Arcade AI enables you to evaluate your custom tools to ensure they function corr
Learn how to evaluate your tools by following our [evaluating tools guide](https://docs.arcade-ai.com/home/evaluate-tools/create-an-evaluation-suite). Learn how to evaluate your tools by following our [evaluating tools guide](https://docs.arcade-ai.com/home/evaluate-tools/create-an-evaluation-suite).
### Auth
<img src="https://docs.arcade-ai.com/images/icons/github.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/google.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/linkedin.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/msft.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/slack.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/spotify.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/twitter.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/zoom.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/oauth2.png" alt="" width="30" height="30" style="vertical-align: top;" />
<br><br>
Learn how to use Arcade AI to obtain user authorization for accessing third-party services in our [authorizing agents with Arcade AI guide](https://docs.arcade-ai.com/home/get-a-token-for-a-user).
Learn how to use Arcade AI's auth providers to enable tools and agents to call other services on behalf of users in our [tools with auth guide](https://docs.arcade-ai.com/home/build-tools/create-a-tool-with-auth).
To see all available auth providers, refer to the [auth providers documentation](https://docs.arcade-ai.com/integrations).
### Models ### Models
<img src="https://docs.arcade-ai.com/images/icons/openai.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/anthropic.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/ollama.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/groq.png" alt="" width="30" height="30" style="vertical-align: top;" /> <img src="https://docs.arcade-ai.com/images/icons/openai.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/anthropic.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/ollama.png" alt="" width="30" height="30" style="vertical-align: top;" /><img src="https://docs.arcade-ai.com/images/icons/groq.png" alt="" width="30" height="30" style="vertical-align: top;" />

View file

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "langchain-arcade" name = "langchain-arcade"
version = "0.1.1" version = "0.1.2"
description = "An integration package connecting Arcade AI and LangChain/LangGraph" description = "An integration package connecting Arcade AI and LangChain/LangGraph"
authors = ["Arcade AI <dev@arcade-ai.com>"] authors = ["Arcade AI <dev@arcade-ai.com>"]
readme = "README.md" readme = "README.md"