langchain-arcade 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,6 +110,8 @@ class ArcadeToolManager:
110
110
  if tools or toolkits:
111
111
  new_tools = self._retrieve_tool_definitions(tools, toolkits)
112
112
  self._tools.update(new_tools)
113
+ elif len(self) == 0:
114
+ self.init_tools()
113
115
 
114
116
  langchain_tools: list[StructuredTool] = []
115
117
  for tool_name, definition in self:
@@ -138,7 +140,7 @@ class ArcadeToolManager:
138
140
 
139
141
  Example:
140
142
  >>> manager = ArcadeToolManager(api_key="...")
141
- >>> manager.init_tools(tools=["Searc"])
143
+ >>> manager.init_tools(toolkits=["Search"])
142
144
  >>> manager.is_authorized("auth_123")
143
145
  """
144
146
  return self.client.auth.status(authorization_id=authorization_id).status == "completed"
@@ -161,7 +163,7 @@ class ArcadeToolManager:
161
163
  self, tools: Optional[list[str]] = None, toolkits: Optional[list[str]] = None
162
164
  ) -> dict[str, ToolDefinition]:
163
165
  all_tools: list[ToolDefinition] = []
164
- if tools or toolkits:
166
+ if tools is not None or toolkits is not None:
165
167
  if tools:
166
168
  single_tools = [self.client.tools.get(tool_id=tool_id) for tool_id in tools]
167
169
  all_tools.extend(single_tools)
@@ -170,7 +172,8 @@ class ArcadeToolManager:
170
172
  all_tools.extend(self.client.tools.list(toolkit=tk))
171
173
  else:
172
174
  # retrieve all tools
173
- all_tools = self.client.tools.list().items
175
+ page_iterator = self.client.tools.list()
176
+ all_tools.extend(page_iterator)
174
177
 
175
178
  tool_definitions: dict[str, ToolDefinition] = {}
176
179
 
@@ -0,0 +1,60 @@
1
+ Metadata-Version: 2.1
2
+ Name: langchain-arcade
3
+ Version: 0.1.2
4
+ Summary: An integration package connecting Arcade AI and LangChain/LangGraph
5
+ Home-page: https://github.com/arcadeai/arcade-ai/tree/main/contrib/langchain
6
+ License: MIT
7
+ Author: Arcade AI
8
+ Author-email: dev@arcade-ai.com
9
+ Requires-Python: >=3.10,<3.13
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Provides-Extra: langgraph
16
+ Requires-Dist: arcadepy (>=0.1.2,<0.2.0)
17
+ Requires-Dist: langchain-core (>=0.3.0,<0.4.0)
18
+ Requires-Dist: langgraph (>=0.2.32,<0.3.0) ; extra == "langgraph"
19
+ Project-URL: Repository, https://github.com/arcadeai/arcade-ai/tree/main/contrib/langchain
20
+ Description-Content-Type: text/markdown
21
+
22
+ <h3 align="center">
23
+ <a name="readme-top"></a>
24
+ <img
25
+ src="https://docs.arcade-ai.com/images/logo/arcade-ai-logo.png"
26
+ >
27
+ </h3>
28
+ <div align="center">
29
+ <h3>LangChain Integration</h3>
30
+ <a href="https://github.com/arcadeai/arcade-ai/blob/main/LICENSE">
31
+ <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License">
32
+ </a>
33
+ <a href="https://pepy.tech/project/langchain-arcade">
34
+ <img src="https://static.pepy.tech/badge/langchain-arcade" alt="Downloads">
35
+ </a>
36
+
37
+ </div>
38
+
39
+ <p align="center">
40
+ <a href="https://docs.arcade-ai.com" target="_blank">Docs</a> •
41
+ <a href="https://docs.arcade-ai.com/integrations" target="_blank">Integrations</a> •
42
+ <a href="https://github.com/ArcadeAI/cookbook" target="_blank">Cookbook</a> •
43
+ <a href="https://github.com/ArcadeAI/arcade-py" target="_blank">Python Client</a> •
44
+ <a href="https://github.com/ArcadeAI/arcade-js" target="_blank">JavaScript Client</a>
45
+ </p>
46
+
47
+ ## Overview
48
+
49
+ `langchain-arcade` allows you to use Arcade AI tools in your LangChain and LangGraph applications.
50
+
51
+ ## Installation
52
+
53
+ ```bash
54
+ pip install langchain-arcade
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ See the [examples](https://github.com/ArcadeAI/arcade-ai/tree/main/examples/langchain) for usage examples
60
+
@@ -0,0 +1,8 @@
1
+ langchain_arcade/__init__.py,sha256=nYAKEQBNNacNjGU6r_UY3lpkNzurGdujh2AsmdOky78,72
2
+ langchain_arcade/_utilities.py,sha256=G6IEYfhSh4dPa7tT94qHMP1QmgP2xyTLibwtMXYRHy4,6032
3
+ langchain_arcade/manager.py,sha256=2mSwGu89a91KH0qDk9KVcslKapEDmcUHIzpLuy2Xxhg,6371
4
+ langchain_arcade/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ langchain_arcade-0.1.2.dist-info/LICENSE,sha256=108KqUBZubw2RlcTUyNL3IdivNNLKjXoONGFEmzoaeo,1067
6
+ langchain_arcade-0.1.2.dist-info/METADATA,sha256=LZUlUCqzgW9j93qU2BrkA4MoKcwwamoZ9cTY7fQHHEg,2103
7
+ langchain_arcade-0.1.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
8
+ langchain_arcade-0.1.2.dist-info/RECORD,,
@@ -1,73 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: langchain-arcade
3
- Version: 0.1.0
4
- Summary: An integration package connecting Arcade AI and LangChain/LangGraph
5
- Home-page: https://github.com/arcadeai/arcade-ai/tree/main/contrib/langchain
6
- License: MIT
7
- Author: Arcade AI
8
- Author-email: dev@arcade-ai.com
9
- Requires-Python: >=3.10,<3.13
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Provides-Extra: langgraph
16
- Requires-Dist: arcadepy (>=0.1.1,<0.2.0)
17
- Requires-Dist: langchain-core (>=0.3.0,<0.4.0)
18
- Requires-Dist: langgraph (>=0.2.32,<0.3.0) ; extra == "langgraph"
19
- Project-URL: Repository, https://github.com/arcadeai/arcade-ai/tree/main/contrib/langchain
20
- Description-Content-Type: text/markdown
21
-
22
- <div align="center">
23
-
24
- <img width="400px" src="https://docs-112.pages.dev/images/logo/arcade-ai-logo.png" />
25
-
26
- ### LLM Tool Calling Platform
27
-
28
- <p>
29
- <img alt="GitHub Last Commit" src="https://img.shields.io/github/last-commit/arcadeai/arcade-ai" />
30
- <img alt="GitHub Issues" src="https://img.shields.io/github/issues/arcadeai/arcade-ai" />
31
- <img alt="GitHub Pull Requests" src="https://img.shields.io/github/issues-pr/arcadeai/arcade-ai" />
32
- <img alt="GitHub License" src="https://img.shields.io/badge/License-MIT-yellow.svg" />
33
- <img alt="Discord" src="https://img.shields.io/discord/1110910277110743103?label=Discord&logo=discord&logoColor=white&style=plastic&color=d7b023)](https://discord.gg/" />
34
- </p>
35
-
36
- ---
37
-
38
- <p align="center">
39
- <a href="https://docs-112.pages.dev" target="_blank">Docs</a> •
40
- <a href="https://docs-112.pages.dev/guides" target="_blank">Guides</a> •
41
- <a href="https://docs-112.pages.dev/integrations" target="_blank">Integrations</a> •
42
- <a href="https://discord.com/invite/" target="_blank">Discord</a>
43
-
44
- </p>
45
-
46
- <br />
47
-
48
- </div>
49
-
50
- Arcade AI is the developer platform for building tools designed to be used with language models. With Arcade, developers can create, deploy, and easily integrate new tools with language models to enhance their capabilities.
51
-
52
- ## Setup
53
-
54
- Follow [these instructions](https://docs-112.pages.dev/home/quickstart) to Install Arcade AI and create an API key.
55
-
56
- This example is using OpenAI, as the LLM provider. Ensure you have an [OpenAI API key](https://platform.openai.com/docs/quickstart).
57
-
58
- Copy the `.env.example` file to `.env` and supply your API keys for `OPENAI_API_KEY` and `ARCADE_API_KEY`.
59
-
60
- ## Usage with LangGraph API
61
-
62
- ### Local testing with LangGraph Studio
63
-
64
- For testing locally (e.g., currently supported only on MacOS), you can use the LangGraph Studio desktop application.
65
-
66
- [Download LangGraph Studio](https://github.com/langchain-ai/langgraph-studio?tab=readme-ov-file#download) and open this directory in the Studio application.
67
-
68
- The `langgraph.json` file in this directory specifies the graph that will be loaded in Studio.
69
-
70
- ### Deploying to LangGraph Cloud
71
-
72
- Follow [these instructions](https://langchain-ai.github.io/langgraph/cloud/quick_start/#deploy-to-cloud) to deploy your graph to LangGraph Cloud.
73
-
@@ -1,8 +0,0 @@
1
- langchain_arcade/__init__.py,sha256=nYAKEQBNNacNjGU6r_UY3lpkNzurGdujh2AsmdOky78,72
2
- langchain_arcade/_utilities.py,sha256=G6IEYfhSh4dPa7tT94qHMP1QmgP2xyTLibwtMXYRHy4,6032
3
- langchain_arcade/manager.py,sha256=qIo_mMXWxX1AjEpt4hbNvyCM2-Bp40auyHTogO39s4w,6242
4
- langchain_arcade/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- langchain_arcade-0.1.0.dist-info/LICENSE,sha256=108KqUBZubw2RlcTUyNL3IdivNNLKjXoONGFEmzoaeo,1067
6
- langchain_arcade-0.1.0.dist-info/METADATA,sha256=CJbBgYZDyIdLuXsu7nrJ71_v1qJqhrYmv7zPq_RdonA,3135
7
- langchain_arcade-0.1.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
8
- langchain_arcade-0.1.0.dist-info/RECORD,,