hyperpocket-anthropic 0.1.7__py3-none-any.whl → 0.1.8__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- hyperpocket_anthropic/pocket_anthropic.py +1 -1
- {hyperpocket_anthropic-0.1.7.dist-info → hyperpocket_anthropic-0.1.8.dist-info}/METADATA +27 -30
- hyperpocket_anthropic-0.1.8.dist-info/RECORD +7 -0
- {hyperpocket_anthropic-0.1.7.dist-info → hyperpocket_anthropic-0.1.8.dist-info}/WHEEL +1 -1
- hyperpocket_anthropic-0.1.7.dist-info/RECORD +0 -7
@@ -66,7 +66,7 @@ class PocketAnthropic(Pocket):
|
|
66
66
|
|
67
67
|
def get_anthropic_tool_specs(self) -> List[dict]:
|
68
68
|
specs = []
|
69
|
-
for tool in self.tools.values():
|
69
|
+
for tool in self.core.tools.values():
|
70
70
|
spec = self.get_anthropic_tool_spec(tool)
|
71
71
|
specs.append(spec)
|
72
72
|
return specs
|
@@ -1,16 +1,10 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: hyperpocket-anthropic
|
3
|
-
Version: 0.1.
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
Requires-
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
9
|
-
Classifier: Programming Language :: Python :: 3.11
|
10
|
-
Classifier: Programming Language :: Python :: 3.12
|
11
|
-
Classifier: Programming Language :: Python :: 3.13
|
12
|
-
Requires-Dist: anthropic (>=0.40.0,<0.41.0)
|
13
|
-
Requires-Dist: hyperpocket (>=0.0.3,<0.0.4)
|
3
|
+
Version: 0.1.8
|
4
|
+
Author-email: moon <moon@vessl.ai>
|
5
|
+
Requires-Python: >=3.10
|
6
|
+
Requires-Dist: anthropic>=0.40.0
|
7
|
+
Requires-Dist: hyperpocket>=0.0.3
|
14
8
|
Description-Content-Type: text/markdown
|
15
9
|
|
16
10
|
## Anthropic extensions
|
@@ -18,13 +12,15 @@ Description-Content-Type: text/markdown
|
|
18
12
|
### Get Pocket Anthropic Tool Spec
|
19
13
|
|
20
14
|
```python
|
21
|
-
|
22
|
-
|
15
|
+
from hyperpocket.tool import from_git
|
16
|
+
|
17
|
+
from hyperpocket_anthropic import PocketAnthropic
|
23
18
|
|
24
19
|
pocket = PocketAnthropic(tools=[
|
25
|
-
|
26
|
-
|
27
|
-
"https://github.com/
|
20
|
+
"https://github.com/my-org/some-awesome-tool",
|
21
|
+
from_git("https://github.com/vessl-ai/hyperawesometools", "main", "managed-tools/slack/get-message"),
|
22
|
+
from_git("https://github.com/vessl-ai/hyperawesometools", "main", "managed-tools/slack/post-message"),
|
23
|
+
]
|
28
24
|
)
|
29
25
|
|
30
26
|
# get anthropic compatible tool specs from pocket
|
@@ -90,14 +86,15 @@ response_after_tool_call = llm.messages.create(
|
|
90
86
|
import os
|
91
87
|
|
92
88
|
from anthropic import Anthropic
|
89
|
+
from hyperpocket.tool import from_git
|
93
90
|
|
94
|
-
|
95
|
-
from pocket_anthropic import PocketAnthropic
|
91
|
+
from hyperpocket_anthropic import PocketAnthropic
|
96
92
|
|
97
93
|
pocket = PocketAnthropic(tools=[
|
98
|
-
|
99
|
-
|
100
|
-
"https://github.com/
|
94
|
+
"https://github.com/my-org/some-awesome-tool",
|
95
|
+
from_git("https://github.com/vessl-ai/hyperawesometools", "main", "managed-tools/slack/get-message"),
|
96
|
+
from_git("https://github.com/vessl-ai/hyperawesometools", "main", "managed-tools/slack/post-message"),
|
97
|
+
]
|
101
98
|
)
|
102
99
|
|
103
100
|
# get anthropic compatible tool specs from pocket
|
@@ -141,16 +138,16 @@ response_after_tool_call = llm.messages.create(
|
|
141
138
|
import os
|
142
139
|
|
143
140
|
from anthropic import Anthropic
|
141
|
+
from hyperpocket.tool import from_git
|
144
142
|
|
145
|
-
|
146
|
-
from pocket_anthropic import PocketAnthropic
|
143
|
+
from hyperpocket_anthropic import PocketAnthropic
|
147
144
|
|
148
145
|
client = Anthropic()
|
149
|
-
pocket = PocketAnthropic(
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
146
|
+
pocket = PocketAnthropic(tools=[
|
147
|
+
"https://github.com/my-org/some-awesome-tool",
|
148
|
+
from_git("https://github.com/vessl-ai/hyperawesometools", "main", "managed-tools/slack/get-message"),
|
149
|
+
from_git("https://github.com/vessl-ai/hyperawesometools", "main", "managed-tools/slack/post-message"),
|
150
|
+
]
|
154
151
|
)
|
155
152
|
|
156
153
|
tool_specs = pocket.get_anthropic_tool_specs()
|
@@ -191,4 +188,4 @@ while True:
|
|
191
188
|
|
192
189
|
if response.stop_reason != "tool_use":
|
193
190
|
break
|
194
|
-
```
|
191
|
+
```
|
@@ -0,0 +1,7 @@
|
|
1
|
+
hyperpocket_anthropic/__init__.py,sha256=XZl2uODSPMjSOO1LwrJOVMUD1qmGCuykx9SDePN7gLo,98
|
2
|
+
hyperpocket_anthropic/pocket_anthropic.py,sha256=XBSxxSeHjzvWx-jiqozf64e8CtBzz3I-dDQ4pBBHnNU,2309
|
3
|
+
hyperpocket_anthropic/util/__init__.py,sha256=U8x3PBHTFMpbtbAA5-pQVsggQ3Yph4oeC13wfyzK21I,123
|
4
|
+
hyperpocket_anthropic/util/tool_to_anthropic_spec.py,sha256=lMq1QiWDPhPjJ3dPzQOJhJdF_F4Y-HwXiBC2dQf_ul4,678
|
5
|
+
hyperpocket_anthropic-0.1.8.dist-info/METADATA,sha256=Bf6m9nu8oSigeDXx-ND1VGnngCmE0SeauiK7kr0gt0s,4807
|
6
|
+
hyperpocket_anthropic-0.1.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
7
|
+
hyperpocket_anthropic-0.1.8.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
hyperpocket_anthropic/__init__.py,sha256=XZl2uODSPMjSOO1LwrJOVMUD1qmGCuykx9SDePN7gLo,98
|
2
|
-
hyperpocket_anthropic/pocket_anthropic.py,sha256=gv7K6tfqDylYgn-SyBvySzwZTkz4G1mhJyQi5-6NHKM,2304
|
3
|
-
hyperpocket_anthropic/util/__init__.py,sha256=U8x3PBHTFMpbtbAA5-pQVsggQ3Yph4oeC13wfyzK21I,123
|
4
|
-
hyperpocket_anthropic/util/tool_to_anthropic_spec.py,sha256=lMq1QiWDPhPjJ3dPzQOJhJdF_F4Y-HwXiBC2dQf_ul4,678
|
5
|
-
hyperpocket_anthropic-0.1.7.dist-info/METADATA,sha256=gBPSSGKj27mq8UfrTfF-tSJCwlh26569EfT3JmB5PE4,4710
|
6
|
-
hyperpocket_anthropic-0.1.7.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
7
|
-
hyperpocket_anthropic-0.1.7.dist-info/RECORD,,
|