@@ -22,7 +22,7 @@ The `PicaClientOptions` class allows you to configure the Pica client with the f
22
22
| ` connectors ` | ` List[str] ` | Optional list of connector keys to give the LLM access to. If not provided, all available connectors will be initialized. |
23
23
24
24
25
- ### Basic Usage
25
+ ### Quick Start
26
26
27
27
``` python
28
28
from langchain_openai import ChatOpenAI
@@ -88,46 +88,6 @@ result = agent.run("What actions are available in Gmail?")
88
88
print (result)
89
89
```
90
90
91
- ### Using Tools Directly
92
-
93
- ``` python
94
- from pica_langchain import PicaClient, GetAvailableActionsTool, GetActionKnowledgeTool, ExecuteTool
95
- import json
96
-
97
- # Initialize the Pica client
98
- pica_client = PicaClient(secret = " your-pica-secret" )
99
-
100
- # Create individual tools
101
- get_actions_tool = GetAvailableActionsTool(client = pica_client)
102
- get_knowledge_tool = GetActionKnowledgeTool(client = pica_client)
103
- execute_tool = ExecuteTool(client = pica_client)
104
-
105
- # Fetch available actions
106
- actions_result = get_actions_tool.run(" gmail" )
107
- print (actions_result)
108
-
109
- # Parse actions result to extract an action ID
110
- actions_data = json.loads(actions_result)
111
- action_id = actions_data[" actions" ][0 ][" _id" ]
112
-
113
- # Retrieve action knowledge
114
- knowledge_result = get_knowledge_tool.run(platform = " gmail" , action_id = action_id)
115
- print (knowledge_result)
116
-
117
- # Extract action path
118
- knowledge_data = json.loads(knowledge_result)
119
- action_path = knowledge_data[" action" ][" path" ]
120
-
121
- # Execute the action
122
- execute_result = execute_tool.run(
123
- platform = " gmail" ,
124
- action_id = action_id,
125
- action_path = action_path,
126
- method = " GET" ,
127
- connection_key = " gmail-1"
128
- )
129
- print (execute_result)
130
- ```
131
91
132
92
## Development
133
93
0 commit comments