versionhq 1.1.7.8__tar.gz → 1.1.7.9__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.
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/PKG-INFO +2 -2
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/README.md +1 -1
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/pyproject.toml +1 -1
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/__init__.py +1 -1
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/product/model.py +4 -1
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/workflow/model.py +5 -5
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq.egg-info/PKG-INFO +2 -2
- versionhq-1.1.7.9/tests/clients/workflow_test.py +84 -0
- versionhq-1.1.7.8/tests/clients/workflow_test.py +0 -32
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.github/workflows/publish.yml +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.github/workflows/publish_testpypi.yml +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.github/workflows/run_tests.yml +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.github/workflows/security_check.yml +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.gitignore +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.pre-commit-config.yaml +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/.python-version +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/LICENSE +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/SECURITY.md +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/db/preprocess.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/requirements-dev.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/requirements.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/runtime.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/setup.cfg +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/cache_handler.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/i18n.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/logger.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/process_config.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/rpm_controller.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/_utils/usage_metrics.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/agent/TEMPLATES/Backstory.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/agent/TEMPLATES/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/agent/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/agent/model.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/agent/parser.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/cli/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/customer/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/customer/model.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/product/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/clients/workflow/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/llm/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/llm/llm_vars.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/llm/model.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/storage/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/storage/task_output_storage.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/task/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/task/formatter.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/task/log_handler.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/task/model.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/team/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/team/model.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/team/team_planner.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/tool/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/tool/decorator.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/tool/model.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq/tool/tool_handler.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq.egg-info/SOURCES.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq.egg-info/dependency_links.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq.egg-info/requires.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/src/versionhq.egg-info/top_level.txt +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/agent/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/agent/agent_test.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/cli/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/conftest.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/task/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/task/task_test.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/team/Prompts/Demo_test.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/team/__init__.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/tests/team/team_test.py +0 -0
- {versionhq-1.1.7.8 → versionhq-1.1.7.9}/uv.lock +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.1.7.
|
3
|
+
Version: 1.1.7.9
|
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
|
@@ -57,7 +57,7 @@ Requires-Dist: appdirs>=1.4.4
|
|
57
57
|
|
58
58
|

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

|
61
61
|

|
62
62
|

|
63
63
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|

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

|
6
6
|

|
7
7
|

|
8
8
|
|
@@ -15,7 +15,7 @@ exclude = ["test*", "__pycache__"]
|
|
15
15
|
|
16
16
|
[project]
|
17
17
|
name = "versionhq"
|
18
|
-
version = "1.1.7.
|
18
|
+
version = "1.1.7.9"
|
19
19
|
authors = [{ name = "Kuriko Iwai", email = "kuriko@versi0n.io" }]
|
20
20
|
description = "LLM orchestration frameworks for model-agnostic AI agents that handle complex outbound workflows"
|
21
21
|
readme = "README.md"
|
@@ -34,7 +34,10 @@ class Product(BaseModel):
|
|
34
34
|
id: UUID4 = Field(default_factory=uuid.uuid4, frozen=True)
|
35
35
|
name: Optional[str] = Field(default=None, description="product name")
|
36
36
|
description: Optional[str] = Field(
|
37
|
-
default=None,
|
37
|
+
default=None,
|
38
|
+
max_length=256,
|
39
|
+
description="product description scraped from landing url or client input. cascade to the agent"
|
40
|
+
)
|
38
41
|
provider: Optional[ProductProvider] = Field(default=None)
|
39
42
|
audience: Optional[str] = Field(default=None, description="target audience")
|
40
43
|
usp: Optional[str] = Field(default=None)
|
@@ -60,6 +60,7 @@ class MessagingComponent(ABC, BaseModel):
|
|
60
60
|
default=None, description="interval to move on to the next layer. if this is the last layer, set as `None`"
|
61
61
|
)
|
62
62
|
score: float | InstanceOf[Score] = Field(default=None)
|
63
|
+
condition: str = Field(default=None, max_length=128, description="condition to execute the next messaging component")
|
63
64
|
|
64
65
|
|
65
66
|
def store_scoring_result(self, scoring_subject: str, score_raw: int | Score | ScoreFormat = None):
|
@@ -106,7 +107,7 @@ class MessagingWorkflow(ABC, BaseModel):
|
|
106
107
|
default=None, description="store `Agent` instances responsible for autopiloting this workflow. if the team exsits, this field remains as `None`")
|
107
108
|
|
108
109
|
# metrics
|
109
|
-
destination: Optional[str] = Field(
|
110
|
+
destination: Optional[str | None] = Field(default=None, description="destination service to launch this workflow")
|
110
111
|
product: InstanceOf[Product] = Field(default=None)
|
111
112
|
customer: InstanceOf[Customer] = Field(default=None)
|
112
113
|
|
@@ -142,10 +143,9 @@ class MessagingWorkflow(ABC, BaseModel):
|
|
142
143
|
if self.customer is not None:
|
143
144
|
self.destination = self.customer.on
|
144
145
|
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
self.destination = destination_list[0]
|
146
|
+
elif self.product.provider is not None and self.product.provider.destinations:
|
147
|
+
self.destination = self.product.provider.destinations[0]
|
148
|
+
|
149
149
|
return self
|
150
150
|
|
151
151
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: versionhq
|
3
|
-
Version: 1.1.7.
|
3
|
+
Version: 1.1.7.9
|
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
|
@@ -57,7 +57,7 @@ Requires-Dist: appdirs>=1.4.4
|
|
57
57
|
|
58
58
|

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

|
61
61
|

|
62
62
|

|
63
63
|
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import os
|
2
|
+
import pytest
|
3
|
+
import datetime
|
4
|
+
|
5
|
+
from versionhq.agent.model import Agent
|
6
|
+
from versionhq.llm.model import LLM
|
7
|
+
from versionhq.clients.workflow.model import Score, ScoreFormat, MessagingWorkflow, MessagingComponent
|
8
|
+
from versionhq.clients.product.model import Product, ProductProvider
|
9
|
+
|
10
|
+
|
11
|
+
MODEL_NAME = os.environ.get("LITELLM_MODEL_NAME", "gpt-3.5-turbo")
|
12
|
+
LITELLM_API_KEY = os.environ.get("LITELLM_API_KEY")
|
13
|
+
|
14
|
+
|
15
|
+
def test_store_scores():
|
16
|
+
"""
|
17
|
+
Test if the final result will be calcurated using a random subject
|
18
|
+
"""
|
19
|
+
|
20
|
+
messaging_component = MessagingComponent(message="demo")
|
21
|
+
score_raw = 15
|
22
|
+
messaging_component.store_scoring_result("demo", score_raw=score_raw)
|
23
|
+
|
24
|
+
assert messaging_component.score is not None
|
25
|
+
assert messaging_component.score.result() is not None
|
26
|
+
|
27
|
+
|
28
|
+
def test_score_result():
|
29
|
+
messaging_component = MessagingComponent(message="demo")
|
30
|
+
score_raw = 15
|
31
|
+
messaging_component.store_scoring_result("demo", score_raw=score_raw)
|
32
|
+
|
33
|
+
result = messaging_component.score.result()
|
34
|
+
|
35
|
+
assert result is not None
|
36
|
+
assert result != 0
|
37
|
+
|
38
|
+
|
39
|
+
def test_setup_messaging_workflow_with_anonymous_provider():
|
40
|
+
product = Product(
|
41
|
+
description="demo p",
|
42
|
+
audience="demo audience",
|
43
|
+
usp="demo usp",
|
44
|
+
landing_url="www.com",
|
45
|
+
cohort_timeframe=30,
|
46
|
+
)
|
47
|
+
comp = MessagingComponent(message="demo")
|
48
|
+
messaging_workflow = MessagingWorkflow(
|
49
|
+
_created_at=datetime.datetime.now(),
|
50
|
+
components=[comp, ],
|
51
|
+
agents=[],
|
52
|
+
product=product,
|
53
|
+
)
|
54
|
+
|
55
|
+
assert messaging_workflow.id is not None
|
56
|
+
assert messaging_workflow.destination is None
|
57
|
+
|
58
|
+
|
59
|
+
def test_setup_messaging_workflow_with_provider():
|
60
|
+
provider = ProductProvider(
|
61
|
+
name="demo provider",
|
62
|
+
region="US",
|
63
|
+
data_pipeline=["data"],
|
64
|
+
destinations=["email", "linkedin",]
|
65
|
+
)
|
66
|
+
product = Product(
|
67
|
+
description="demo p",
|
68
|
+
audience="demo audience",
|
69
|
+
usp="demo usp",
|
70
|
+
landing_url="www.com",
|
71
|
+
cohort_timeframe=30,
|
72
|
+
provider=provider,
|
73
|
+
)
|
74
|
+
comp = MessagingComponent(message="demo")
|
75
|
+
messaging_workflow = MessagingWorkflow(
|
76
|
+
_created_at=datetime.datetime.now(),
|
77
|
+
components=[comp, ],
|
78
|
+
agents=[],
|
79
|
+
product=product,
|
80
|
+
)
|
81
|
+
|
82
|
+
assert messaging_workflow.id is not None
|
83
|
+
assert messaging_workflow.destination is not None
|
84
|
+
assert messaging_workflow.destination in provider.destinations
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import os
|
2
|
-
import pytest
|
3
|
-
from versionhq.agent.model import Agent
|
4
|
-
from versionhq.llm.model import LLM
|
5
|
-
from versionhq.clients.workflow.model import Score, ScoreFormat, MessagingWorkflow, MessagingComponent
|
6
|
-
|
7
|
-
MODEL_NAME = os.environ.get("LITELLM_MODEL_NAME", "gpt-3.5-turbo")
|
8
|
-
LITELLM_API_KEY = os.environ.get("LITELLM_API_KEY")
|
9
|
-
|
10
|
-
|
11
|
-
def test_store_scores():
|
12
|
-
"""
|
13
|
-
Test if the final result will be calcurated using a random subject
|
14
|
-
"""
|
15
|
-
|
16
|
-
messaging_component = MessagingComponent(message="demo")
|
17
|
-
score_raw = 15
|
18
|
-
messaging_component.store_scoring_result("demo", score_raw=score_raw)
|
19
|
-
|
20
|
-
assert messaging_component.score is not None
|
21
|
-
assert messaging_component.score.result() is not None
|
22
|
-
|
23
|
-
|
24
|
-
def test_score_result():
|
25
|
-
messaging_component = MessagingComponent(message="demo")
|
26
|
-
score_raw = 15
|
27
|
-
messaging_component.store_scoring_result("demo", score_raw=score_raw)
|
28
|
-
|
29
|
-
result = messaging_component.score.result()
|
30
|
-
|
31
|
-
assert result is not None
|
32
|
-
assert result != 0
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|