kweaver-dolphin 0.1.0__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.
- DolphinLanguageSDK/__init__.py +58 -0
- dolphin/__init__.py +62 -0
- dolphin/cli/__init__.py +20 -0
- dolphin/cli/args/__init__.py +9 -0
- dolphin/cli/args/parser.py +567 -0
- dolphin/cli/builtin_agents/__init__.py +22 -0
- dolphin/cli/commands/__init__.py +4 -0
- dolphin/cli/interrupt/__init__.py +8 -0
- dolphin/cli/interrupt/handler.py +205 -0
- dolphin/cli/interrupt/keyboard.py +82 -0
- dolphin/cli/main.py +49 -0
- dolphin/cli/multimodal/__init__.py +34 -0
- dolphin/cli/multimodal/clipboard.py +327 -0
- dolphin/cli/multimodal/handler.py +249 -0
- dolphin/cli/multimodal/image_processor.py +214 -0
- dolphin/cli/multimodal/input_parser.py +149 -0
- dolphin/cli/runner/__init__.py +8 -0
- dolphin/cli/runner/runner.py +989 -0
- dolphin/cli/ui/__init__.py +10 -0
- dolphin/cli/ui/console.py +2795 -0
- dolphin/cli/ui/input.py +340 -0
- dolphin/cli/ui/layout.py +425 -0
- dolphin/cli/ui/stream_renderer.py +302 -0
- dolphin/cli/utils/__init__.py +8 -0
- dolphin/cli/utils/helpers.py +135 -0
- dolphin/cli/utils/version.py +49 -0
- dolphin/core/__init__.py +107 -0
- dolphin/core/agent/__init__.py +10 -0
- dolphin/core/agent/agent_state.py +69 -0
- dolphin/core/agent/base_agent.py +970 -0
- dolphin/core/code_block/__init__.py +0 -0
- dolphin/core/code_block/agent_init_block.py +0 -0
- dolphin/core/code_block/assign_block.py +98 -0
- dolphin/core/code_block/basic_code_block.py +1865 -0
- dolphin/core/code_block/explore_block.py +1327 -0
- dolphin/core/code_block/explore_block_v2.py +712 -0
- dolphin/core/code_block/explore_strategy.py +672 -0
- dolphin/core/code_block/judge_block.py +220 -0
- dolphin/core/code_block/prompt_block.py +32 -0
- dolphin/core/code_block/skill_call_deduplicator.py +291 -0
- dolphin/core/code_block/tool_block.py +129 -0
- dolphin/core/common/__init__.py +17 -0
- dolphin/core/common/constants.py +176 -0
- dolphin/core/common/enums.py +1173 -0
- dolphin/core/common/exceptions.py +133 -0
- dolphin/core/common/multimodal.py +539 -0
- dolphin/core/common/object_type.py +165 -0
- dolphin/core/common/output_format.py +432 -0
- dolphin/core/common/types.py +36 -0
- dolphin/core/config/__init__.py +16 -0
- dolphin/core/config/global_config.py +1289 -0
- dolphin/core/config/ontology_config.py +133 -0
- dolphin/core/context/__init__.py +12 -0
- dolphin/core/context/context.py +1580 -0
- dolphin/core/context/context_manager.py +161 -0
- dolphin/core/context/var_output.py +82 -0
- dolphin/core/context/variable_pool.py +356 -0
- dolphin/core/context_engineer/__init__.py +41 -0
- dolphin/core/context_engineer/config/__init__.py +5 -0
- dolphin/core/context_engineer/config/settings.py +402 -0
- dolphin/core/context_engineer/core/__init__.py +7 -0
- dolphin/core/context_engineer/core/budget_manager.py +327 -0
- dolphin/core/context_engineer/core/context_assembler.py +583 -0
- dolphin/core/context_engineer/core/context_manager.py +637 -0
- dolphin/core/context_engineer/core/tokenizer_service.py +260 -0
- dolphin/core/context_engineer/example/incremental_example.py +267 -0
- dolphin/core/context_engineer/example/traditional_example.py +334 -0
- dolphin/core/context_engineer/services/__init__.py +5 -0
- dolphin/core/context_engineer/services/compressor.py +399 -0
- dolphin/core/context_engineer/utils/__init__.py +6 -0
- dolphin/core/context_engineer/utils/context_utils.py +441 -0
- dolphin/core/context_engineer/utils/message_formatter.py +270 -0
- dolphin/core/context_engineer/utils/token_utils.py +139 -0
- dolphin/core/coroutine/__init__.py +15 -0
- dolphin/core/coroutine/context_snapshot.py +154 -0
- dolphin/core/coroutine/context_snapshot_profile.py +922 -0
- dolphin/core/coroutine/context_snapshot_store.py +268 -0
- dolphin/core/coroutine/execution_frame.py +145 -0
- dolphin/core/coroutine/execution_state_registry.py +161 -0
- dolphin/core/coroutine/resume_handle.py +101 -0
- dolphin/core/coroutine/step_result.py +101 -0
- dolphin/core/executor/__init__.py +18 -0
- dolphin/core/executor/debug_controller.py +630 -0
- dolphin/core/executor/dolphin_executor.py +1063 -0
- dolphin/core/executor/executor.py +624 -0
- dolphin/core/flags/__init__.py +27 -0
- dolphin/core/flags/definitions.py +49 -0
- dolphin/core/flags/manager.py +113 -0
- dolphin/core/hook/__init__.py +95 -0
- dolphin/core/hook/expression_evaluator.py +499 -0
- dolphin/core/hook/hook_dispatcher.py +380 -0
- dolphin/core/hook/hook_types.py +248 -0
- dolphin/core/hook/isolated_variable_pool.py +284 -0
- dolphin/core/interfaces.py +53 -0
- dolphin/core/llm/__init__.py +0 -0
- dolphin/core/llm/llm.py +495 -0
- dolphin/core/llm/llm_call.py +100 -0
- dolphin/core/llm/llm_client.py +1285 -0
- dolphin/core/llm/message_sanitizer.py +120 -0
- dolphin/core/logging/__init__.py +20 -0
- dolphin/core/logging/logger.py +526 -0
- dolphin/core/message/__init__.py +8 -0
- dolphin/core/message/compressor.py +749 -0
- dolphin/core/parser/__init__.py +8 -0
- dolphin/core/parser/parser.py +405 -0
- dolphin/core/runtime/__init__.py +10 -0
- dolphin/core/runtime/runtime_graph.py +926 -0
- dolphin/core/runtime/runtime_instance.py +446 -0
- dolphin/core/skill/__init__.py +14 -0
- dolphin/core/skill/context_retention.py +157 -0
- dolphin/core/skill/skill_function.py +686 -0
- dolphin/core/skill/skill_matcher.py +282 -0
- dolphin/core/skill/skillkit.py +700 -0
- dolphin/core/skill/skillset.py +72 -0
- dolphin/core/trajectory/__init__.py +10 -0
- dolphin/core/trajectory/recorder.py +189 -0
- dolphin/core/trajectory/trajectory.py +522 -0
- dolphin/core/utils/__init__.py +9 -0
- dolphin/core/utils/cache_kv.py +212 -0
- dolphin/core/utils/tools.py +340 -0
- dolphin/lib/__init__.py +93 -0
- dolphin/lib/debug/__init__.py +8 -0
- dolphin/lib/debug/visualizer.py +409 -0
- dolphin/lib/memory/__init__.py +28 -0
- dolphin/lib/memory/async_processor.py +220 -0
- dolphin/lib/memory/llm_calls.py +195 -0
- dolphin/lib/memory/manager.py +78 -0
- dolphin/lib/memory/sandbox.py +46 -0
- dolphin/lib/memory/storage.py +245 -0
- dolphin/lib/memory/utils.py +51 -0
- dolphin/lib/ontology/__init__.py +12 -0
- dolphin/lib/ontology/basic/__init__.py +0 -0
- dolphin/lib/ontology/basic/base.py +102 -0
- dolphin/lib/ontology/basic/concept.py +130 -0
- dolphin/lib/ontology/basic/object.py +11 -0
- dolphin/lib/ontology/basic/relation.py +63 -0
- dolphin/lib/ontology/datasource/__init__.py +27 -0
- dolphin/lib/ontology/datasource/datasource.py +66 -0
- dolphin/lib/ontology/datasource/oracle_datasource.py +338 -0
- dolphin/lib/ontology/datasource/sql.py +845 -0
- dolphin/lib/ontology/mapping.py +177 -0
- dolphin/lib/ontology/ontology.py +733 -0
- dolphin/lib/ontology/ontology_context.py +16 -0
- dolphin/lib/ontology/ontology_manager.py +107 -0
- dolphin/lib/skill_results/__init__.py +31 -0
- dolphin/lib/skill_results/cache_backend.py +559 -0
- dolphin/lib/skill_results/result_processor.py +181 -0
- dolphin/lib/skill_results/result_reference.py +179 -0
- dolphin/lib/skill_results/skillkit_hook.py +324 -0
- dolphin/lib/skill_results/strategies.py +328 -0
- dolphin/lib/skill_results/strategy_registry.py +150 -0
- dolphin/lib/skillkits/__init__.py +44 -0
- dolphin/lib/skillkits/agent_skillkit.py +155 -0
- dolphin/lib/skillkits/cognitive_skillkit.py +82 -0
- dolphin/lib/skillkits/env_skillkit.py +250 -0
- dolphin/lib/skillkits/mcp_adapter.py +616 -0
- dolphin/lib/skillkits/mcp_skillkit.py +771 -0
- dolphin/lib/skillkits/memory_skillkit.py +650 -0
- dolphin/lib/skillkits/noop_skillkit.py +31 -0
- dolphin/lib/skillkits/ontology_skillkit.py +89 -0
- dolphin/lib/skillkits/plan_act_skillkit.py +452 -0
- dolphin/lib/skillkits/resource/__init__.py +52 -0
- dolphin/lib/skillkits/resource/models/__init__.py +6 -0
- dolphin/lib/skillkits/resource/models/skill_config.py +109 -0
- dolphin/lib/skillkits/resource/models/skill_meta.py +127 -0
- dolphin/lib/skillkits/resource/resource_skillkit.py +393 -0
- dolphin/lib/skillkits/resource/skill_cache.py +215 -0
- dolphin/lib/skillkits/resource/skill_loader.py +395 -0
- dolphin/lib/skillkits/resource/skill_validator.py +406 -0
- dolphin/lib/skillkits/resource_skillkit.py +11 -0
- dolphin/lib/skillkits/search_skillkit.py +163 -0
- dolphin/lib/skillkits/sql_skillkit.py +274 -0
- dolphin/lib/skillkits/system_skillkit.py +509 -0
- dolphin/lib/skillkits/vm_skillkit.py +65 -0
- dolphin/lib/utils/__init__.py +9 -0
- dolphin/lib/utils/data_process.py +207 -0
- dolphin/lib/utils/handle_progress.py +178 -0
- dolphin/lib/utils/security.py +139 -0
- dolphin/lib/utils/text_retrieval.py +462 -0
- dolphin/lib/vm/__init__.py +11 -0
- dolphin/lib/vm/env_executor.py +895 -0
- dolphin/lib/vm/python_session_manager.py +453 -0
- dolphin/lib/vm/vm.py +610 -0
- dolphin/sdk/__init__.py +60 -0
- dolphin/sdk/agent/__init__.py +12 -0
- dolphin/sdk/agent/agent_factory.py +236 -0
- dolphin/sdk/agent/dolphin_agent.py +1106 -0
- dolphin/sdk/api/__init__.py +4 -0
- dolphin/sdk/runtime/__init__.py +8 -0
- dolphin/sdk/runtime/env.py +363 -0
- dolphin/sdk/skill/__init__.py +10 -0
- dolphin/sdk/skill/global_skills.py +706 -0
- dolphin/sdk/skill/traditional_toolkit.py +260 -0
- kweaver_dolphin-0.1.0.dist-info/METADATA +521 -0
- kweaver_dolphin-0.1.0.dist-info/RECORD +199 -0
- kweaver_dolphin-0.1.0.dist-info/WHEEL +5 -0
- kweaver_dolphin-0.1.0.dist-info/entry_points.txt +27 -0
- kweaver_dolphin-0.1.0.dist-info/licenses/LICENSE.txt +201 -0
- kweaver_dolphin-0.1.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Dict, List, Optional
|
|
3
|
+
|
|
4
|
+
from dolphin.core.skill.skill_function import SkillFunction
|
|
5
|
+
from dolphin.core.skill.skill_matcher import SkillMatcher
|
|
6
|
+
|
|
7
|
+
from .skillkit import Skillkit
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Skillset(Skillkit):
|
|
11
|
+
"""A container that aggregates skills from multiple skillkits.
|
|
12
|
+
|
|
13
|
+
Unlike regular Skillkits that create skills via _createSkills(),
|
|
14
|
+
Skillset dynamically collects skills from other skillkits.
|
|
15
|
+
It overrides getSkills() to return its managed collection directly,
|
|
16
|
+
bypassing the base class caching mechanism.
|
|
17
|
+
|
|
18
|
+
Note: Metadata prompt functionality is NOT handled here. It is collected
|
|
19
|
+
dynamically via skill.owner_skillkit in ExploreStrategy._collect_metadata_prompt().
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
def __init__(self):
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.skills: Dict[str, SkillFunction] = {}
|
|
25
|
+
|
|
26
|
+
def merge(self, otherSkillset: Skillset):
|
|
27
|
+
self.skills.update(otherSkillset.skills)
|
|
28
|
+
|
|
29
|
+
def addSkillkit(self, skillkit: Skillkit):
|
|
30
|
+
"""Add all skills from a skillkit to this skillset.
|
|
31
|
+
|
|
32
|
+
Skills are retrieved via skillkit.getSkills(), which automatically
|
|
33
|
+
binds owner_skillkit in the base Skillkit class. This binding is
|
|
34
|
+
used by ExploreStrategy to collect metadata prompts dynamically.
|
|
35
|
+
"""
|
|
36
|
+
for skill in skillkit.getSkills():
|
|
37
|
+
self.addSkill(skill)
|
|
38
|
+
|
|
39
|
+
def addSkill(self, skill: SkillFunction):
|
|
40
|
+
if skill.get_function_name() not in self.getSkillNames():
|
|
41
|
+
self.skills[skill.get_function_name()] = skill
|
|
42
|
+
|
|
43
|
+
def getSkillNames(self):
|
|
44
|
+
return self.skills.keys()
|
|
45
|
+
|
|
46
|
+
def getSkills(self) -> List[SkillFunction]:
|
|
47
|
+
"""Return the aggregated skills directly.
|
|
48
|
+
|
|
49
|
+
This overrides the base class implementation to return the
|
|
50
|
+
dynamically managed skills collection without caching.
|
|
51
|
+
Skills already have owner_skillkit bound from their source skillkits.
|
|
52
|
+
"""
|
|
53
|
+
return list(self.skills.values())
|
|
54
|
+
|
|
55
|
+
@staticmethod
|
|
56
|
+
def createSkillset(
|
|
57
|
+
globalSkillset: Skillset, skillNames: Optional[List[str]] = None
|
|
58
|
+
):
|
|
59
|
+
newSkillset = Skillset()
|
|
60
|
+
if skillNames is None:
|
|
61
|
+
return globalSkillset
|
|
62
|
+
|
|
63
|
+
# Get skills using wildcard matching with SkillMatcher
|
|
64
|
+
matched_skills = SkillMatcher.get_matching_skills(
|
|
65
|
+
globalSkillset.getSkills(), skillNames
|
|
66
|
+
)
|
|
67
|
+
for skill in matched_skills:
|
|
68
|
+
newSkillset.addSkill(skill)
|
|
69
|
+
return newSkillset
|
|
70
|
+
|
|
71
|
+
def isEmpty(self) -> bool:
|
|
72
|
+
return len(self.skills) == 0
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from dolphin.core.common.enums import StreamItem
|
|
3
|
+
from dolphin.core.common.enums import TypeStage, Status, SkillInfo, SkillType
|
|
4
|
+
from dolphin.core.runtime.runtime_instance import ProgressInstance
|
|
5
|
+
from dolphin.core.common.types import SourceType
|
|
6
|
+
from typing import Union, Dict, Any
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Recorder:
|
|
10
|
+
def __init__(
|
|
11
|
+
self,
|
|
12
|
+
context,
|
|
13
|
+
progress: ProgressInstance,
|
|
14
|
+
assign_type=None,
|
|
15
|
+
output_var=None,
|
|
16
|
+
output_dump_process=False,
|
|
17
|
+
flags="",
|
|
18
|
+
):
|
|
19
|
+
self.context = context
|
|
20
|
+
self.progress = progress
|
|
21
|
+
self.assign_type = assign_type
|
|
22
|
+
self.output_var = output_var
|
|
23
|
+
self.output_dump_process = output_dump_process
|
|
24
|
+
self.appended = False
|
|
25
|
+
|
|
26
|
+
def set_output_var(self, assign_type, output_var):
|
|
27
|
+
self.assign_type = assign_type
|
|
28
|
+
self.output_var = output_var
|
|
29
|
+
|
|
30
|
+
def set_output_dump_process(self, output_dump_process):
|
|
31
|
+
self.output_dump_process = output_dump_process
|
|
32
|
+
|
|
33
|
+
def getProgress(self):
|
|
34
|
+
return self.progress
|
|
35
|
+
|
|
36
|
+
def update(
|
|
37
|
+
self,
|
|
38
|
+
item: Union[StreamItem, Dict[str, Any], str] = {},
|
|
39
|
+
stage=None, # Changed to None, let us infer automatically
|
|
40
|
+
is_completed=False,
|
|
41
|
+
has_error=False,
|
|
42
|
+
input_messages=None,
|
|
43
|
+
source_type=SourceType.OTHER,
|
|
44
|
+
raw_output=None,
|
|
45
|
+
skill_name=None,
|
|
46
|
+
skill_args={},
|
|
47
|
+
skill_type=None,
|
|
48
|
+
checked=True,
|
|
49
|
+
):
|
|
50
|
+
skill_info = None
|
|
51
|
+
if skill_name:
|
|
52
|
+
stage = TypeStage.SKILL
|
|
53
|
+
# Use provided skill_type or default to TOOL
|
|
54
|
+
if skill_type is None:
|
|
55
|
+
skill_type = SkillType.TOOL
|
|
56
|
+
skill_info = SkillInfo.build(
|
|
57
|
+
skill_type=skill_type,
|
|
58
|
+
skill_name=skill_name,
|
|
59
|
+
skill_args=skill_args,
|
|
60
|
+
checked=checked,
|
|
61
|
+
)
|
|
62
|
+
source_type = SourceType.SKILL
|
|
63
|
+
|
|
64
|
+
# Auto-detect stage type based on source_type if not explicitly provided
|
|
65
|
+
if stage is None:
|
|
66
|
+
if source_type == SourceType.SKILL:
|
|
67
|
+
stage = TypeStage.SKILL
|
|
68
|
+
elif source_type == SourceType.ASSIGN:
|
|
69
|
+
stage = TypeStage.ASSIGN
|
|
70
|
+
elif source_type == SourceType.EXPLORE:
|
|
71
|
+
# For EXPLORE source, don't create new stage, just update existing one
|
|
72
|
+
# Use None to signal that we should update the last stage without changing its type
|
|
73
|
+
stage = None
|
|
74
|
+
else:
|
|
75
|
+
stage = TypeStage.LLM # Default fallback
|
|
76
|
+
|
|
77
|
+
if not is_completed:
|
|
78
|
+
status = Status.PROCESSING
|
|
79
|
+
elif has_error:
|
|
80
|
+
status = Status.FAILED
|
|
81
|
+
else:
|
|
82
|
+
status = Status.COMPLETED
|
|
83
|
+
|
|
84
|
+
params = {
|
|
85
|
+
"stage": stage,
|
|
86
|
+
"status": status,
|
|
87
|
+
"skill_info": skill_info,
|
|
88
|
+
"raw_output": raw_output,
|
|
89
|
+
"input_messages": input_messages,
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if isinstance(item, StreamItem):
|
|
93
|
+
params.update(item.to_dict())
|
|
94
|
+
else:
|
|
95
|
+
if isinstance(item, dict):
|
|
96
|
+
safe_item = {k: v for k, v in item.items() if k not in params.keys()}
|
|
97
|
+
else:
|
|
98
|
+
safe_item = {"answer": item}
|
|
99
|
+
params.update(safe_item)
|
|
100
|
+
|
|
101
|
+
# Unified answer field: ensure answer has value if block_answer is present
|
|
102
|
+
# This maintains backward compatibility while providing a consistent API
|
|
103
|
+
if "block_answer" in params and params["block_answer"]:
|
|
104
|
+
if "answer" not in params or not params["answer"]:
|
|
105
|
+
params["answer"] = params["block_answer"]
|
|
106
|
+
|
|
107
|
+
self.progress.set_last_stage(**params)
|
|
108
|
+
|
|
109
|
+
# Ensure end_time is set for completed stages
|
|
110
|
+
if is_completed:
|
|
111
|
+
last_stage = self.progress.get_last_stage()
|
|
112
|
+
if last_stage:
|
|
113
|
+
last_stage.set_end_time()
|
|
114
|
+
|
|
115
|
+
# If item is None and has already been set via set_last_stage, there's no need to process it again.
|
|
116
|
+
if item is not None:
|
|
117
|
+
self.update_output_variable(
|
|
118
|
+
item=item,
|
|
119
|
+
source_type=source_type,
|
|
120
|
+
skill_name=skill_name,
|
|
121
|
+
skill_args=skill_args,
|
|
122
|
+
skill_type=skill_type,
|
|
123
|
+
checked=checked,
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
return item
|
|
127
|
+
|
|
128
|
+
def update_output_variable(
|
|
129
|
+
self,
|
|
130
|
+
item: Union[StreamItem, Dict[str, Any], str],
|
|
131
|
+
source_type=SourceType.OTHER,
|
|
132
|
+
skill_name=None,
|
|
133
|
+
skill_args={},
|
|
134
|
+
skill_type=None,
|
|
135
|
+
checked=True,
|
|
136
|
+
):
|
|
137
|
+
skill_info = None
|
|
138
|
+
if skill_name:
|
|
139
|
+
# Use provided skill_type or default to TOOL
|
|
140
|
+
if skill_type is None:
|
|
141
|
+
skill_type = SkillType.TOOL
|
|
142
|
+
skill_info = SkillInfo.build(
|
|
143
|
+
skill_type=skill_type,
|
|
144
|
+
skill_name=skill_name,
|
|
145
|
+
skill_args=skill_args,
|
|
146
|
+
checked=checked,
|
|
147
|
+
)
|
|
148
|
+
source_type = SourceType.SKILL
|
|
149
|
+
|
|
150
|
+
# If item is a dictionary and contains the output_var_value field, prioritize using the parsed object
|
|
151
|
+
var_value = item
|
|
152
|
+
if isinstance(item, dict) and "output_var_value" in item:
|
|
153
|
+
var_value = item["output_var_value"]
|
|
154
|
+
item.pop("output_var_value")
|
|
155
|
+
elif isinstance(item, StreamItem):
|
|
156
|
+
var_value = item.to_dict()
|
|
157
|
+
|
|
158
|
+
if self.assign_type == ">>":
|
|
159
|
+
if not self.appended:
|
|
160
|
+
self.context.append_var_output(
|
|
161
|
+
name=self.output_var,
|
|
162
|
+
value=var_value,
|
|
163
|
+
source_type=source_type,
|
|
164
|
+
skill_info=skill_info,
|
|
165
|
+
)
|
|
166
|
+
self.appended = True
|
|
167
|
+
else:
|
|
168
|
+
self.context.set_last_var_output(
|
|
169
|
+
name=self.output_var,
|
|
170
|
+
value=var_value,
|
|
171
|
+
source_type=source_type,
|
|
172
|
+
skill_info=skill_info,
|
|
173
|
+
)
|
|
174
|
+
else:
|
|
175
|
+
self.context.set_var_output(
|
|
176
|
+
name=self.output_var,
|
|
177
|
+
value=var_value,
|
|
178
|
+
source_type=source_type,
|
|
179
|
+
skill_info=skill_info,
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
def get_answer(self):
|
|
183
|
+
return self.progress.get_last_answer().get("answer", "")
|
|
184
|
+
|
|
185
|
+
def get_progress_answers(self) -> dict:
|
|
186
|
+
return self.progress.get_last_answer()
|
|
187
|
+
|
|
188
|
+
def get_all_answers(self) -> list[dict]:
|
|
189
|
+
return self.progress.get()
|