versionhq 1.1.7.4__py3-none-any.whl → 1.1.7.5__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.
- versionhq/__init__.py +1 -1
- versionhq/clients/workflow/model.py +7 -7
- versionhq/task/model.py +9 -7
- {versionhq-1.1.7.4.dist-info → versionhq-1.1.7.5.dist-info}/METADATA +51 -8
- {versionhq-1.1.7.4.dist-info → versionhq-1.1.7.5.dist-info}/RECORD +8 -8
- {versionhq-1.1.7.4.dist-info → versionhq-1.1.7.5.dist-info}/LICENSE +0 -0
- {versionhq-1.1.7.4.dist-info → versionhq-1.1.7.5.dist-info}/WHEEL +0 -0
- {versionhq-1.1.7.4.dist-info → versionhq-1.1.7.5.dist-info}/top_level.txt +0 -0
versionhq/__init__.py
CHANGED
@@ -61,21 +61,21 @@ class MessagingComponent(ABC, BaseModel):
|
|
61
61
|
score: Union[float, InstanceOf[Score]] = Field(default=None)
|
62
62
|
|
63
63
|
|
64
|
-
def store_scoring_result(self, scoring_subject: str,
|
64
|
+
def store_scoring_result(self, scoring_subject: str, score_raw: Union[int, Score, ScoreFormat] = None):
|
65
65
|
"""
|
66
66
|
Set up the `score` field
|
67
67
|
"""
|
68
68
|
|
69
|
-
if isinstance(
|
70
|
-
setattr(self, "score",
|
69
|
+
if isinstance(score_raw, Score):
|
70
|
+
setattr(self, "score", score_raw)
|
71
71
|
|
72
|
-
elif isinstance(
|
72
|
+
elif isinstance(score_raw, ScoreFormat):
|
73
73
|
score_instance = Score()
|
74
|
-
setattr(score_instance, scoring_subject,
|
74
|
+
setattr(score_instance, scoring_subject, score_raw)
|
75
75
|
setattr(self, "score", score_instance)
|
76
76
|
|
77
|
-
elif isinstance(
|
78
|
-
score_instance, score_format_instance = Score(), ScoreFormat(rate=
|
77
|
+
elif isinstance(score_raw, int) or isinstance(score_raw, float):
|
78
|
+
score_instance, score_format_instance = Score(), ScoreFormat(rate=score_raw, weight=1)
|
79
79
|
setattr(score_instance, "kwargs", { scoring_subject: score_format_instance })
|
80
80
|
setattr(self, "score", score_instance)
|
81
81
|
|
versionhq/task/model.py
CHANGED
@@ -436,9 +436,14 @@ Your outputs MUST adhere to the following format and should NOT include any irre
|
|
436
436
|
agent = agent_to_delegate
|
437
437
|
self.delegations += 1
|
438
438
|
|
439
|
-
output_raw = agent.execute_task(task=self, context=context)
|
440
|
-
|
441
|
-
|
439
|
+
output_raw, output_json_dict, output_pydantic = agent.execute_task(task=self, context=context), None, None
|
440
|
+
|
441
|
+
if self.expected_output_json:
|
442
|
+
output_json_dict = self.create_json_output(raw_result=output_raw)
|
443
|
+
|
444
|
+
if self.expected_output_pydantic:
|
445
|
+
output_pydantic = self.create_pydantic_output(output_json_dict=output_json_dict)
|
446
|
+
|
442
447
|
task_output = TaskOutput(
|
443
448
|
task_id=self.id,
|
444
449
|
raw=output_raw,
|
@@ -451,10 +456,7 @@ Your outputs MUST adhere to the following format and should NOT include any irre
|
|
451
456
|
# self._set_end_execution_time(start_time)
|
452
457
|
|
453
458
|
if self.callback:
|
454
|
-
|
455
|
-
self.callback(**self.callback_kwargs)
|
456
|
-
else:
|
457
|
-
self.callback(self.output)
|
459
|
+
self.callback({ **self.callback_kwargs, **self.output.__dict__ })
|
458
460
|
|
459
461
|
# if self._execution_span:
|
460
462
|
# # self._telemetry.task_ended(self._execution_span, self, agent.team)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.1.7.
|
3
|
+
Version: 1.1.7.5
|
4
4
|
Summary: LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows
|
5
5
|
Author-email: Kuriko Iwai <kuriko@versi0n.io>
|
6
6
|
License: MIT License
|
@@ -52,7 +52,11 @@ Requires-Dist: wheel>=0.45.1
|
|
52
52
|
|
53
53
|
# Overview
|
54
54
|
|
55
|
-

|
55
|
+

|
56
|
+
[](https://github.com/versionHQ/multi-agent-system/actions/workflows/publish.yml)
|
57
|
+

|
58
|
+

|
59
|
+

|
56
60
|
|
57
61
|
|
58
62
|
An LLM orchestration frameworks for multi-agent systems with RAG to autopilot outbound workflows.
|
@@ -64,10 +68,11 @@ Messaging workflows are created at individual level, and will be deployed on thi
|
|
64
68
|
|
65
69
|
**Visit:**
|
66
70
|
|
67
|
-
- [
|
68
|
-
- [
|
69
|
-
- [
|
70
|
-
- [
|
71
|
+
- [PyPI](https://pypi.org/project/versionhq/)
|
72
|
+
- [Github (LLM orchestration)](https://github.com/versionHQ/multi-agent-system)
|
73
|
+
- [Github (Test client app)](https://github.com/versionHQ/test-client-app)
|
74
|
+
- [Use case](https://versi0n.io/) - client app (alpha)
|
75
|
+
|
71
76
|
|
72
77
|
<hr />
|
73
78
|
|
@@ -87,6 +92,8 @@ LLM-powered `agent`s and `team`s use `tool`s and their own knowledge to complete
|
|
87
92
|
|
88
93
|
- [Key Features](#key-features)
|
89
94
|
- [Usage](#usage)
|
95
|
+
- [Case 1. Build an AI agent on LLM of your choice and execute a task:](#case-1-build-an-ai-agent-on-llm-of-your-choice-and-execute-a-task)
|
96
|
+
- [Case 2. Form a team to handle multiple tasks:](#case-2-form-a-team-to-handle-multiple-tasks)
|
90
97
|
- [Technologies Used](#technologies-used)
|
91
98
|
- [Project Structure](#project-structure)
|
92
99
|
- [Setup](#setup)
|
@@ -132,7 +139,8 @@ Multiple `agents` can form a `team` to complete complex tasks together.
|
|
132
139
|
|
133
140
|
2. You can use the `versionhq` module in your Python app.
|
134
141
|
|
135
|
-
|
142
|
+
|
143
|
+
### Case 1. Build an AI agent on LLM of your choice and execute a task:
|
136
144
|
|
137
145
|
```
|
138
146
|
from versionhq.agent.model import Agent
|
@@ -142,6 +150,7 @@ Multiple `agents` can form a `team` to complete complex tasks together.
|
|
142
150
|
role="demo",
|
143
151
|
goal="amazing project goal",
|
144
152
|
skillsets=["skill_1", "skill_2", ],
|
153
|
+
tools=["amazing RAG tool",]
|
145
154
|
llm="llm-of-your-choice"
|
146
155
|
)
|
147
156
|
|
@@ -165,7 +174,41 @@ This will return a dictionary with keys defined in the `ResponseField`.
|
|
165
174
|
{ test1: "answer1", "test2": ["answer2-1", "answer2-2", "answer2-3",] }
|
166
175
|
```
|
167
176
|
|
168
|
-
|
177
|
+
### Case 2. Form a team to handle multiple tasks:
|
178
|
+
|
179
|
+
```
|
180
|
+
from versionhq.agent.model import Agent
|
181
|
+
from versionhq.task.model import Task, ResponseField
|
182
|
+
from versionhq.team.model import Team, TeamMember
|
183
|
+
|
184
|
+
agent_a = Agent(role="agent a", goal="My amazing goals", llm="llm-of-your-choice")
|
185
|
+
agent_b = Agent(role="agent b", goal="My amazing goals", llm="llm-of-your-choice")
|
186
|
+
|
187
|
+
task_1 = Task(
|
188
|
+
description="Analyze the client's business model.",
|
189
|
+
output_field_list=[ResponseField(title="test1", type=str, required=True),],
|
190
|
+
allow_delegation=True
|
191
|
+
)
|
192
|
+
|
193
|
+
task_2 = Task(
|
194
|
+
description="Define the cohort.",
|
195
|
+
output_field_list=[ResponseField(title="test1", type=int, required=True),],
|
196
|
+
allow_delegation=False
|
197
|
+
)
|
198
|
+
|
199
|
+
team = Team(
|
200
|
+
members=[
|
201
|
+
TeamMember(agent=agent_a, is_manager=False, task=task_1),
|
202
|
+
TeamMember(agent=agent_b, is_manager=True, task=task_2),
|
203
|
+
],
|
204
|
+
)
|
205
|
+
res = team.kickoff()
|
206
|
+
```
|
207
|
+
|
208
|
+
This will return a list with dictionaries with keys defined in the `ResponseField` of each task.
|
209
|
+
|
210
|
+
Tasks can be delegated to a team manager, peers in the team, or completely new agent.
|
211
|
+
|
169
212
|
|
170
213
|
<hr />
|
171
214
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
versionhq/__init__.py,sha256=
|
1
|
+
versionhq/__init__.py,sha256=HUTPmQJfxelI9dE_8G3mSK6--29L_B9zbIs_adJ1SJI,871
|
2
2
|
versionhq/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
versionhq/_utils/cache_handler.py,sha256=zDQKzIn7vp-M2-uepHFxgJstjfftZS5mzXKL_-4uVvI,370
|
4
4
|
versionhq/_utils/i18n.py,sha256=TwA_PnYfDLA6VqlUDPuybdV9lgi3Frh_ASsb_X8jJo8,1483
|
@@ -18,13 +18,13 @@ versionhq/clients/customer/model.py,sha256=rQnCv_wdCdrYAsUjyB6X6ULiuWfqcBBoarXcQ
|
|
18
18
|
versionhq/clients/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
19
|
versionhq/clients/product/model.py,sha256=Us3UnzYlub6ipBislMN-JrvxZx0ocl9PtQJINJ8XtBA,2385
|
20
20
|
versionhq/clients/workflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
-
versionhq/clients/workflow/model.py,sha256=
|
21
|
+
versionhq/clients/workflow/model.py,sha256=qpRCDwULhSLWDFkSYrvXW5m07bKDrwttTmqsYA9ZVP4,5727
|
22
22
|
versionhq/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
23
|
versionhq/llm/llm_vars.py,sha256=YZoXqFBW7XpclUZ14_AAz7WOjoyCXnGcI959GSpX2q0,5343
|
24
24
|
versionhq/llm/model.py,sha256=PdwisrlrsDqd6gXwXCyGbGTRTeGZ8SXpt_gfua8qunk,8266
|
25
25
|
versionhq/task/__init__.py,sha256=g4mCATnn1mUXxsfQ5p6IpPawr8O421wVIT8kMKEcxQw,180
|
26
26
|
versionhq/task/formatter.py,sha256=N8Kmk9vtrMtBdgJ8J7RmlKNMdZWSmV8O1bDexmCWgU0,643
|
27
|
-
versionhq/task/model.py,sha256=
|
27
|
+
versionhq/task/model.py,sha256=4Uh0OBLUO_YXaejxHbOHtNa4vckgI3abSaPz80_s9X4,18519
|
28
28
|
versionhq/team/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
29
29
|
versionhq/team/model.py,sha256=RyspmYVtXW3f4MKjWT1mnpM9XdE435d8HbEQms7LHMU,19821
|
30
30
|
versionhq/team/team_planner.py,sha256=B1UOn_DYVVterUn2CAd80jfO4sViJCCXPJA3abSSugg,2143
|
@@ -32,8 +32,8 @@ versionhq/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
32
|
versionhq/tool/decorator.py,sha256=Y-j4jkoujD5LUvpe8uf3p5Zagk2XVaRKC9rkIE-2geo,1189
|
33
33
|
versionhq/tool/model.py,sha256=JZOEcZRIEfcrjL8DgrFYDt4YNgMF8rXS26RK6D2x9mc,6906
|
34
34
|
versionhq/tool/tool_handler.py,sha256=e-2VfG9zFpfPG_oMoPXye93GDovs7FuUASWQwUTLrJ0,1498
|
35
|
-
versionhq-1.1.7.
|
36
|
-
versionhq-1.1.7.
|
37
|
-
versionhq-1.1.7.
|
38
|
-
versionhq-1.1.7.
|
39
|
-
versionhq-1.1.7.
|
35
|
+
versionhq-1.1.7.5.dist-info/LICENSE,sha256=7CCXuMrAjPVsUvZrsBq9DsxI2rLDUSYXR_qj4yO_ZII,1077
|
36
|
+
versionhq-1.1.7.5.dist-info/METADATA,sha256=g95oUiLVJPtABZEz1CLjq2opMbjWMLtD0XLXu3zG4Rw,15801
|
37
|
+
versionhq-1.1.7.5.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
38
|
+
versionhq-1.1.7.5.dist-info/top_level.txt,sha256=DClQwxDWqIUGeRJkA8vBlgeNsYZs4_nJWMonzFt5Wj0,10
|
39
|
+
versionhq-1.1.7.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|