aap-core 0.1.1.dev1__tar.gz → 0.1.2.dev1__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.
- aap_core-0.1.2.dev1/PKG-INFO +23 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/pyproject.toml +14 -1
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/chain.py +1 -1
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/orchestration.py +0 -9
- aap_core-0.1.2.dev1/src/aap_core/thought.py +14 -0
- aap_core-0.1.1.dev1/PKG-INFO +0 -14
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/README.md +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/__init__.py +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/agent.py +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/guardrail.py +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/prompt_enhancer.py +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/py.typed +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/types.py +0 -0
- {aap_core-0.1.1.dev1 → aap_core-0.1.2.dev1}/src/aap_core/utils.py +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: aap-core
|
|
3
|
+
Version: 0.1.2.dev1
|
|
4
|
+
Summary: Agent design pattern core framework
|
|
5
|
+
Author: Ly Hon Quang
|
|
6
|
+
Author-email: Ly Hon Quang <lyhonquang@gmail.com>
|
|
7
|
+
License: MIT
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
14
|
+
Classifier: Framework :: Pydantic :: 2
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Dist: a2a-sdk>=0.3.12
|
|
17
|
+
Requires-Dist: pandas>=2.0.0
|
|
18
|
+
Requires-Dist: rouge-score>=0.1.2
|
|
19
|
+
Requires-Dist: sacrebleu>=2.5.1
|
|
20
|
+
Requires-Python: >=3.10.12
|
|
21
|
+
Project-URL: Repository, https://github.com/quanghona/agent_design_pattern.git
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "aap_core"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2.dev1"
|
|
4
4
|
description = "Agent design pattern core framework"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
@@ -14,6 +14,19 @@ dependencies = [
|
|
|
14
14
|
"rouge-score>=0.1.2",
|
|
15
15
|
"sacrebleu>=2.5.1",
|
|
16
16
|
]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Programming Language :: Python :: 3.14",
|
|
23
|
+
"Programming Language :: Python :: 3.15",
|
|
24
|
+
"Framework :: Pydantic :: 2",
|
|
25
|
+
"Operating System :: OS Independent",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.urls]
|
|
29
|
+
Repository = "https://github.com/quanghona/agent_design_pattern.git"
|
|
17
30
|
|
|
18
31
|
[dependency-groups]
|
|
19
32
|
lint = [
|
|
@@ -98,7 +98,7 @@ class BaseCausalMultiTurnsChain(BaseLLMChain, Generic[ChainMessage, ChainRespons
|
|
|
98
98
|
class TypicalLLMChain(BaseLLMChain):
|
|
99
99
|
"""
|
|
100
100
|
A LLM chain that consists of all components in a typical response generation.
|
|
101
|
-
The chain
|
|
101
|
+
The chain has 4 steps:
|
|
102
102
|
- input guardrail: validate the input message
|
|
103
103
|
- prompt enhancement: add more context to the prompt or rewrite / refine the prompt
|
|
104
104
|
- generate: generate the response. This steps should also handle the tool calling procedure and finalize the response
|
|
@@ -35,11 +35,6 @@ class ReflectionAgent(BaseAgent):
|
|
|
35
35
|
...,
|
|
36
36
|
description="LLM chain that perform reflection on the result of the main task",
|
|
37
37
|
)
|
|
38
|
-
task_response_key: str = Field(
|
|
39
|
-
default="context_response",
|
|
40
|
-
description="""The key of which to store the context (e.g. intermediate result) during generation.
|
|
41
|
-
Note that the key need to start with 'context_'""",
|
|
42
|
-
)
|
|
43
38
|
|
|
44
39
|
@field_validator("task_response_key")
|
|
45
40
|
@classmethod
|
|
@@ -61,11 +56,7 @@ class ReflectionAgent(BaseAgent):
|
|
|
61
56
|
return message
|
|
62
57
|
|
|
63
58
|
self.state = "reflecting"
|
|
64
|
-
task_response_key = self.task_response_key.replace("context_", "")
|
|
65
59
|
reflect_message = message.model_copy(deep=True)
|
|
66
|
-
reflect_message.context = {}
|
|
67
|
-
_, reflect_message.context[task_response_key] = reflect_message.responses[-1] # type: ignore
|
|
68
|
-
reflect_message.responses = []
|
|
69
60
|
result_message = self.chain_reflection.invoke(reflect_message, **kwargs)
|
|
70
61
|
self.state = "idle"
|
|
71
62
|
result_message.origin = self.card.name
|
aap_core-0.1.1.dev1/PKG-INFO
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.3
|
|
2
|
-
Name: aap-core
|
|
3
|
-
Version: 0.1.1.dev1
|
|
4
|
-
Summary: Agent design pattern core framework
|
|
5
|
-
Author: Ly Hon Quang
|
|
6
|
-
Author-email: Ly Hon Quang <lyhonquang@gmail.com>
|
|
7
|
-
License: MIT
|
|
8
|
-
Requires-Dist: a2a-sdk>=0.3.12
|
|
9
|
-
Requires-Dist: pandas>=2.0.0
|
|
10
|
-
Requires-Dist: rouge-score>=0.1.2
|
|
11
|
-
Requires-Dist: sacrebleu>=2.5.1
|
|
12
|
-
Requires-Python: >=3.10.12
|
|
13
|
-
Description-Content-Type: text/markdown
|
|
14
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|