gohumanloop 0.0.6__tar.gz → 0.0.8__tar.gz

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.
Files changed (36) hide show
  1. {gohumanloop-0.0.6/gohumanloop.egg-info → gohumanloop-0.0.8}/PKG-INFO +44 -5
  2. gohumanloop-0.0.6/PKG-INFO → gohumanloop-0.0.8/README.md +41 -27
  3. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/__init__.py +5 -0
  4. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/adapters/__init__.py +6 -2
  5. gohumanloop-0.0.6/gohumanloop/adapters/langgraph_adapter.py → gohumanloop-0.0.8/gohumanloop/adapters/base_adapter.py +135 -265
  6. gohumanloop-0.0.8/gohumanloop/adapters/langgraph_adapter.py +344 -0
  7. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/core/interface.py +16 -5
  8. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/core/manager.py +43 -1
  9. gohumanloop-0.0.6/README.md → gohumanloop-0.0.8/gohumanloop.egg-info/PKG-INFO +66 -4
  10. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop.egg-info/SOURCES.txt +1 -0
  11. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop.egg-info/requires.txt +3 -0
  12. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/pyproject.toml +4 -1
  13. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/LICENSE +0 -0
  14. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/__main__.py +0 -0
  15. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/cli/__init__.py +0 -0
  16. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/cli/main.py +0 -0
  17. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/core/__init__.py +0 -0
  18. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/manager/__init__.py +0 -0
  19. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/manager/ghl_manager.py +0 -0
  20. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/models/__init__.py +0 -0
  21. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/models/api_model.py +0 -0
  22. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/models/glh_model.py +0 -0
  23. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/providers/__init__.py +0 -0
  24. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/providers/api_provider.py +0 -0
  25. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/providers/base.py +0 -0
  26. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/providers/email_provider.py +0 -0
  27. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/providers/ghl_provider.py +0 -0
  28. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/providers/terminal_provider.py +0 -0
  29. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/utils/__init__.py +0 -0
  30. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/utils/context_formatter.py +0 -0
  31. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/utils/threadsafedict.py +0 -0
  32. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop/utils/utils.py +0 -0
  33. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop.egg-info/dependency_links.txt +0 -0
  34. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop.egg-info/entry_points.txt +0 -0
  35. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/gohumanloop.egg-info/top_level.txt +0 -0
  36. {gohumanloop-0.0.6 → gohumanloop-0.0.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gohumanloop
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Perfecting AI workflows with human intelligence
5
5
  Author-email: gohumanloop authors <baird0917@163.com>
6
6
  Project-URL: repository, https://github.com/ptonlix/gohumanloop
@@ -19,6 +19,8 @@ Requires-Dist: langgraph>=0.3.30; extra == "langgraph"
19
19
  Provides-Extra: apiservices
20
20
  Requires-Dist: fastapi>=0.115.12; extra == "apiservices"
21
21
  Requires-Dist: uvicorn>=0.34.2; extra == "apiservices"
22
+ Provides-Extra: agentops
23
+ Requires-Dist: agentops>=0.4.12; extra == "agentops"
22
24
  Dynamic: license-file
23
25
 
24
26
  <div align="center">
@@ -61,17 +63,15 @@ To get started, check out the following example or jump straight into one of the
61
63
 
62
64
  - 🦜⛓️ [LangGraph](./examples/langgraph/)
63
65
 
64
- ### Example
66
+ ### Installation
65
67
 
66
68
  **GoHumanLoop** currently supports `Python`.
67
69
 
68
- - Installation
69
-
70
70
  ```shell
71
71
  pip install gohumanloop
72
72
  ```
73
73
 
74
- - Example
74
+ ### Example
75
75
 
76
76
  The following example enhances [the official LangGraph example](https://langchain-ai.github.io/langgraph/tutorials/get-started/4-human-in-the-loop/#5-resume-execution) with `human-in-the-loop` functionality.
77
77
 
@@ -95,7 +95,9 @@ from langgraph.prebuilt import ToolNode, tools_condition
95
95
 
96
96
  from gohumanloop.adapters.langgraph_adapter import interrupt, create_resume_command
97
97
 
98
+ # Please replace with your Deepseek API Key from https://platform.deepseek.com/usage
98
99
  os.environ["DEEPSEEK_API_KEY"] = "sk-xxx"
100
+ # Please replace with your Tavily API Key from https://app.tavily.com/home
99
101
  os.environ["TAVILY_API_KEY"] = "tvly-xxx"
100
102
 
101
103
  llm = init_chat_model("deepseek:deepseek-chat")
@@ -169,6 +171,43 @@ for event in events:
169
171
 
170
172
  ```
171
173
 
174
+ - Deployment & Test
175
+
176
+ Run the above code with the following steps:
177
+
178
+ ```shell
179
+ # 1.Initialize environment
180
+ uv init gohumanloop-example
181
+ cd gohumanloop-example
182
+ uv venv .venv --python=3.10
183
+
184
+ # 2.Copy the above code to main.py
185
+
186
+ # 3.Deploy and test
187
+ uv pip install langchain
188
+ uv pip install langchain_tavily
189
+ uv pip install langgraph
190
+ uv pip install langchain-deepseek
191
+ uv pip install gohumanloop
192
+
193
+ python main.py
194
+
195
+ ```
196
+
197
+ - Interaction Demo
198
+
199
+ ![终端展示](http://cdn.oyster-iot.cloud/202505232244870.png)
200
+
201
+ Perform `human-in-the-loop` interaction by entering:
202
+
203
+ > We, the experts are here to help! We'd recommend you check out LangGraph to build your agent.It's much more reliable and extensible than simple autonomous agents.
204
+
205
+ ![输出结果](http://cdn.oyster-iot.cloud/202505232248390.png)
206
+
207
+ 🚀🚀🚀 Completed successfully ~
208
+
209
+ ➡️ Check out more examples in the [Examples Directory](./examples/) and we look foward to your contributions!
210
+
172
211
  ## 🎵 Why GoHumanloop?
173
212
 
174
213
  ### Human-in-the-loop
@@ -1,26 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: gohumanloop
3
- Version: 0.0.6
4
- Summary: Perfecting AI workflows with human intelligence
5
- Author-email: gohumanloop authors <baird0917@163.com>
6
- Project-URL: repository, https://github.com/ptonlix/gohumanloop
7
- Requires-Python: >=3.10
8
- Description-Content-Type: text/markdown
9
- License-File: LICENSE
10
- Requires-Dist: aiohttp>=3.11.16
11
- Requires-Dist: click>=8.1.8
12
- Requires-Dist: dotenv>=0.9.9
13
- Requires-Dist: pydantic>=2.11.3
14
- Requires-Dist: tomli>=2.2.1
15
- Provides-Extra: email
16
- Requires-Dist: imapclient>=3.0.1; extra == "email"
17
- Provides-Extra: langgraph
18
- Requires-Dist: langgraph>=0.3.30; extra == "langgraph"
19
- Provides-Extra: apiservices
20
- Requires-Dist: fastapi>=0.115.12; extra == "apiservices"
21
- Requires-Dist: uvicorn>=0.34.2; extra == "apiservices"
22
- Dynamic: license-file
23
-
24
1
  <div align="center">
25
2
 
26
3
  ![Wordmark Logo of HumanLayer](./docs/images/wordmark.png)
@@ -61,17 +38,15 @@ To get started, check out the following example or jump straight into one of the
61
38
 
62
39
  - 🦜⛓️ [LangGraph](./examples/langgraph/)
63
40
 
64
- ### Example
41
+ ### Installation
65
42
 
66
43
  **GoHumanLoop** currently supports `Python`.
67
44
 
68
- - Installation
69
-
70
45
  ```shell
71
46
  pip install gohumanloop
72
47
  ```
73
48
 
74
- - Example
49
+ ### Example
75
50
 
76
51
  The following example enhances [the official LangGraph example](https://langchain-ai.github.io/langgraph/tutorials/get-started/4-human-in-the-loop/#5-resume-execution) with `human-in-the-loop` functionality.
77
52
 
@@ -95,7 +70,9 @@ from langgraph.prebuilt import ToolNode, tools_condition
95
70
 
96
71
  from gohumanloop.adapters.langgraph_adapter import interrupt, create_resume_command
97
72
 
73
+ # Please replace with your Deepseek API Key from https://platform.deepseek.com/usage
98
74
  os.environ["DEEPSEEK_API_KEY"] = "sk-xxx"
75
+ # Please replace with your Tavily API Key from https://app.tavily.com/home
99
76
  os.environ["TAVILY_API_KEY"] = "tvly-xxx"
100
77
 
101
78
  llm = init_chat_model("deepseek:deepseek-chat")
@@ -169,6 +146,43 @@ for event in events:
169
146
 
170
147
  ```
171
148
 
149
+ - Deployment & Test
150
+
151
+ Run the above code with the following steps:
152
+
153
+ ```shell
154
+ # 1.Initialize environment
155
+ uv init gohumanloop-example
156
+ cd gohumanloop-example
157
+ uv venv .venv --python=3.10
158
+
159
+ # 2.Copy the above code to main.py
160
+
161
+ # 3.Deploy and test
162
+ uv pip install langchain
163
+ uv pip install langchain_tavily
164
+ uv pip install langgraph
165
+ uv pip install langchain-deepseek
166
+ uv pip install gohumanloop
167
+
168
+ python main.py
169
+
170
+ ```
171
+
172
+ - Interaction Demo
173
+
174
+ ![终端展示](http://cdn.oyster-iot.cloud/202505232244870.png)
175
+
176
+ Perform `human-in-the-loop` interaction by entering:
177
+
178
+ > We, the experts are here to help! We'd recommend you check out LangGraph to build your agent.It's much more reliable and extensible than simple autonomous agents.
179
+
180
+ ![输出结果](http://cdn.oyster-iot.cloud/202505232248390.png)
181
+
182
+ 🚀🚀🚀 Completed successfully ~
183
+
184
+ ➡️ Check out more examples in the [Examples Directory](./examples/) and we look foward to your contributions!
185
+
172
186
  ## 🎵 Why GoHumanloop?
173
187
 
174
188
  ### Human-in-the-loop
@@ -17,6 +17,8 @@ from gohumanloop.providers.terminal_provider import TerminalProvider
17
17
 
18
18
  from gohumanloop.utils import run_async_safely, get_secret_from_env
19
19
 
20
+ from gohumanloop.adapters import HumanloopAdapter, AgentOpsHumanLoopCallback
21
+
20
22
  # Conditionally import EmailProvider
21
23
  try:
22
24
  from gohumanloop.providers.email_provider import EmailProvider # noqa: F401
@@ -60,6 +62,9 @@ __all__ = [
60
62
  "APIProvider",
61
63
  "GoHumanLoopProvider",
62
64
  "TerminalProvider",
65
+ # Adapter Implementations
66
+ "HumanloopAdapter",
67
+ "AgentOpsHumanLoopCallback",
63
68
  # Utility Functions
64
69
  "run_async_safely",
65
70
  "get_secret_from_env",
@@ -1,5 +1,8 @@
1
+ from .base_adapter import (
2
+ HumanloopAdapter,
3
+ AgentOpsHumanLoopCallback,
4
+ )
1
5
  from .langgraph_adapter import (
2
- LangGraphAdapter,
3
6
  LangGraphHumanLoopCallback,
4
7
  default_langgraph_callback_factory,
5
8
  interrupt,
@@ -8,7 +11,8 @@ from .langgraph_adapter import (
8
11
  )
9
12
 
10
13
  __all__ = [
11
- "LangGraphAdapter",
14
+ "HumanloopAdapter",
15
+ "AgentOpsHumanLoopCallback",
12
16
  "LangGraphHumanLoopCallback",
13
17
  "default_langgraph_callback_factory",
14
18
  "interrupt",