alita-sdk 0.3.462__py3-none-any.whl → 0.3.627__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.
- alita_sdk/cli/agent/__init__.py +5 -0
- alita_sdk/cli/agent/default.py +258 -0
- alita_sdk/cli/agent_executor.py +15 -3
- alita_sdk/cli/agent_loader.py +56 -8
- alita_sdk/cli/agent_ui.py +93 -31
- alita_sdk/cli/agents.py +2274 -230
- alita_sdk/cli/callbacks.py +96 -25
- alita_sdk/cli/cli.py +10 -1
- alita_sdk/cli/config.py +162 -9
- alita_sdk/cli/context/__init__.py +30 -0
- alita_sdk/cli/context/cleanup.py +198 -0
- alita_sdk/cli/context/manager.py +731 -0
- alita_sdk/cli/context/message.py +285 -0
- alita_sdk/cli/context/strategies.py +289 -0
- alita_sdk/cli/context/token_estimation.py +127 -0
- alita_sdk/cli/input_handler.py +419 -0
- alita_sdk/cli/inventory.py +1073 -0
- alita_sdk/cli/testcases/__init__.py +94 -0
- alita_sdk/cli/testcases/data_generation.py +119 -0
- alita_sdk/cli/testcases/discovery.py +96 -0
- alita_sdk/cli/testcases/executor.py +84 -0
- alita_sdk/cli/testcases/logger.py +85 -0
- alita_sdk/cli/testcases/parser.py +172 -0
- alita_sdk/cli/testcases/prompts.py +91 -0
- alita_sdk/cli/testcases/reporting.py +125 -0
- alita_sdk/cli/testcases/setup.py +108 -0
- alita_sdk/cli/testcases/test_runner.py +282 -0
- alita_sdk/cli/testcases/utils.py +39 -0
- alita_sdk/cli/testcases/validation.py +90 -0
- alita_sdk/cli/testcases/workflow.py +196 -0
- alita_sdk/cli/toolkit.py +14 -17
- alita_sdk/cli/toolkit_loader.py +35 -5
- alita_sdk/cli/tools/__init__.py +36 -2
- alita_sdk/cli/tools/approval.py +224 -0
- alita_sdk/cli/tools/filesystem.py +910 -64
- alita_sdk/cli/tools/planning.py +389 -0
- alita_sdk/cli/tools/terminal.py +414 -0
- alita_sdk/community/__init__.py +72 -12
- alita_sdk/community/inventory/__init__.py +236 -0
- alita_sdk/community/inventory/config.py +257 -0
- alita_sdk/community/inventory/enrichment.py +2137 -0
- alita_sdk/community/inventory/extractors.py +1469 -0
- alita_sdk/community/inventory/ingestion.py +3172 -0
- alita_sdk/community/inventory/knowledge_graph.py +1457 -0
- alita_sdk/community/inventory/parsers/__init__.py +218 -0
- alita_sdk/community/inventory/parsers/base.py +295 -0
- alita_sdk/community/inventory/parsers/csharp_parser.py +907 -0
- alita_sdk/community/inventory/parsers/go_parser.py +851 -0
- alita_sdk/community/inventory/parsers/html_parser.py +389 -0
- alita_sdk/community/inventory/parsers/java_parser.py +593 -0
- alita_sdk/community/inventory/parsers/javascript_parser.py +629 -0
- alita_sdk/community/inventory/parsers/kotlin_parser.py +768 -0
- alita_sdk/community/inventory/parsers/markdown_parser.py +362 -0
- alita_sdk/community/inventory/parsers/python_parser.py +604 -0
- alita_sdk/community/inventory/parsers/rust_parser.py +858 -0
- alita_sdk/community/inventory/parsers/swift_parser.py +832 -0
- alita_sdk/community/inventory/parsers/text_parser.py +322 -0
- alita_sdk/community/inventory/parsers/yaml_parser.py +370 -0
- alita_sdk/community/inventory/patterns/__init__.py +61 -0
- alita_sdk/community/inventory/patterns/ast_adapter.py +380 -0
- alita_sdk/community/inventory/patterns/loader.py +348 -0
- alita_sdk/community/inventory/patterns/registry.py +198 -0
- alita_sdk/community/inventory/presets.py +535 -0
- alita_sdk/community/inventory/retrieval.py +1403 -0
- alita_sdk/community/inventory/toolkit.py +173 -0
- alita_sdk/community/inventory/toolkit_utils.py +176 -0
- alita_sdk/community/inventory/visualize.py +1370 -0
- alita_sdk/configurations/__init__.py +1 -1
- alita_sdk/configurations/ado.py +141 -20
- alita_sdk/configurations/bitbucket.py +0 -3
- alita_sdk/configurations/confluence.py +76 -42
- alita_sdk/configurations/figma.py +76 -0
- alita_sdk/configurations/gitlab.py +17 -5
- alita_sdk/configurations/openapi.py +329 -0
- alita_sdk/configurations/qtest.py +72 -1
- alita_sdk/configurations/report_portal.py +96 -0
- alita_sdk/configurations/sharepoint.py +148 -0
- alita_sdk/configurations/testio.py +83 -0
- alita_sdk/runtime/clients/artifact.py +3 -3
- alita_sdk/runtime/clients/client.py +353 -48
- alita_sdk/runtime/clients/sandbox_client.py +0 -21
- alita_sdk/runtime/langchain/_constants_bkup.py +1318 -0
- alita_sdk/runtime/langchain/assistant.py +123 -26
- alita_sdk/runtime/langchain/constants.py +642 -1
- alita_sdk/runtime/langchain/document_loaders/AlitaExcelLoader.py +103 -60
- alita_sdk/runtime/langchain/document_loaders/AlitaJSONLinesLoader.py +77 -0
- alita_sdk/runtime/langchain/document_loaders/AlitaJSONLoader.py +6 -3
- alita_sdk/runtime/langchain/document_loaders/AlitaPowerPointLoader.py +226 -7
- alita_sdk/runtime/langchain/document_loaders/AlitaTextLoader.py +5 -2
- alita_sdk/runtime/langchain/document_loaders/constants.py +12 -7
- alita_sdk/runtime/langchain/langraph_agent.py +279 -73
- alita_sdk/runtime/langchain/utils.py +82 -15
- alita_sdk/runtime/llms/preloaded.py +2 -6
- alita_sdk/runtime/skills/__init__.py +91 -0
- alita_sdk/runtime/skills/callbacks.py +498 -0
- alita_sdk/runtime/skills/discovery.py +540 -0
- alita_sdk/runtime/skills/executor.py +610 -0
- alita_sdk/runtime/skills/input_builder.py +371 -0
- alita_sdk/runtime/skills/models.py +330 -0
- alita_sdk/runtime/skills/registry.py +355 -0
- alita_sdk/runtime/skills/skill_runner.py +330 -0
- alita_sdk/runtime/toolkits/__init__.py +7 -0
- alita_sdk/runtime/toolkits/application.py +21 -9
- alita_sdk/runtime/toolkits/artifact.py +15 -5
- alita_sdk/runtime/toolkits/datasource.py +13 -6
- alita_sdk/runtime/toolkits/mcp.py +139 -251
- alita_sdk/runtime/toolkits/mcp_config.py +1048 -0
- alita_sdk/runtime/toolkits/planning.py +178 -0
- alita_sdk/runtime/toolkits/skill_router.py +238 -0
- alita_sdk/runtime/toolkits/subgraph.py +251 -6
- alita_sdk/runtime/toolkits/tools.py +238 -32
- alita_sdk/runtime/toolkits/vectorstore.py +11 -5
- alita_sdk/runtime/tools/__init__.py +3 -1
- alita_sdk/runtime/tools/application.py +20 -6
- alita_sdk/runtime/tools/artifact.py +511 -28
- alita_sdk/runtime/tools/data_analysis.py +183 -0
- alita_sdk/runtime/tools/function.py +43 -15
- alita_sdk/runtime/tools/image_generation.py +50 -44
- alita_sdk/runtime/tools/llm.py +852 -67
- alita_sdk/runtime/tools/loop.py +3 -1
- alita_sdk/runtime/tools/loop_output.py +3 -1
- alita_sdk/runtime/tools/mcp_remote_tool.py +25 -10
- alita_sdk/runtime/tools/mcp_server_tool.py +7 -6
- alita_sdk/runtime/tools/planning/__init__.py +36 -0
- alita_sdk/runtime/tools/planning/models.py +246 -0
- alita_sdk/runtime/tools/planning/wrapper.py +607 -0
- alita_sdk/runtime/tools/router.py +2 -4
- alita_sdk/runtime/tools/sandbox.py +9 -6
- alita_sdk/runtime/tools/skill_router.py +776 -0
- alita_sdk/runtime/tools/tool.py +3 -1
- alita_sdk/runtime/tools/vectorstore.py +7 -2
- alita_sdk/runtime/tools/vectorstore_base.py +51 -11
- alita_sdk/runtime/utils/AlitaCallback.py +137 -21
- alita_sdk/runtime/utils/constants.py +5 -1
- alita_sdk/runtime/utils/mcp_client.py +492 -0
- alita_sdk/runtime/utils/mcp_oauth.py +202 -5
- alita_sdk/runtime/utils/mcp_sse_client.py +36 -7
- alita_sdk/runtime/utils/mcp_tools_discovery.py +124 -0
- alita_sdk/runtime/utils/serialization.py +155 -0
- alita_sdk/runtime/utils/streamlit.py +6 -10
- alita_sdk/runtime/utils/toolkit_utils.py +16 -5
- alita_sdk/runtime/utils/utils.py +36 -0
- alita_sdk/tools/__init__.py +113 -29
- alita_sdk/tools/ado/repos/__init__.py +51 -33
- alita_sdk/tools/ado/repos/repos_wrapper.py +148 -89
- alita_sdk/tools/ado/test_plan/__init__.py +25 -9
- alita_sdk/tools/ado/test_plan/test_plan_wrapper.py +23 -1
- alita_sdk/tools/ado/utils.py +1 -18
- alita_sdk/tools/ado/wiki/__init__.py +25 -8
- alita_sdk/tools/ado/wiki/ado_wrapper.py +291 -22
- alita_sdk/tools/ado/work_item/__init__.py +26 -9
- alita_sdk/tools/ado/work_item/ado_wrapper.py +56 -3
- alita_sdk/tools/advanced_jira_mining/__init__.py +11 -8
- alita_sdk/tools/aws/delta_lake/__init__.py +13 -9
- alita_sdk/tools/aws/delta_lake/tool.py +5 -1
- alita_sdk/tools/azure_ai/search/__init__.py +11 -8
- alita_sdk/tools/azure_ai/search/api_wrapper.py +1 -1
- alita_sdk/tools/base/tool.py +5 -1
- alita_sdk/tools/base_indexer_toolkit.py +170 -45
- alita_sdk/tools/bitbucket/__init__.py +17 -12
- alita_sdk/tools/bitbucket/api_wrapper.py +59 -11
- alita_sdk/tools/bitbucket/cloud_api_wrapper.py +49 -35
- alita_sdk/tools/browser/__init__.py +5 -4
- alita_sdk/tools/carrier/__init__.py +5 -6
- alita_sdk/tools/carrier/backend_reports_tool.py +6 -6
- alita_sdk/tools/carrier/run_ui_test_tool.py +6 -6
- alita_sdk/tools/carrier/ui_reports_tool.py +5 -5
- alita_sdk/tools/chunkers/__init__.py +3 -1
- alita_sdk/tools/chunkers/code/treesitter/treesitter.py +37 -13
- alita_sdk/tools/chunkers/sematic/json_chunker.py +1 -0
- alita_sdk/tools/chunkers/sematic/markdown_chunker.py +97 -6
- alita_sdk/tools/chunkers/universal_chunker.py +270 -0
- alita_sdk/tools/cloud/aws/__init__.py +10 -7
- alita_sdk/tools/cloud/azure/__init__.py +10 -7
- alita_sdk/tools/cloud/gcp/__init__.py +10 -7
- alita_sdk/tools/cloud/k8s/__init__.py +10 -7
- alita_sdk/tools/code/linter/__init__.py +10 -8
- alita_sdk/tools/code/loaders/codesearcher.py +3 -2
- alita_sdk/tools/code/sonar/__init__.py +10 -7
- alita_sdk/tools/code_indexer_toolkit.py +73 -23
- alita_sdk/tools/confluence/__init__.py +21 -15
- alita_sdk/tools/confluence/api_wrapper.py +78 -23
- alita_sdk/tools/confluence/loader.py +4 -2
- alita_sdk/tools/custom_open_api/__init__.py +12 -5
- alita_sdk/tools/elastic/__init__.py +11 -8
- alita_sdk/tools/elitea_base.py +493 -30
- alita_sdk/tools/figma/__init__.py +58 -11
- alita_sdk/tools/figma/api_wrapper.py +1235 -143
- alita_sdk/tools/figma/figma_client.py +73 -0
- alita_sdk/tools/figma/toon_tools.py +2748 -0
- alita_sdk/tools/github/__init__.py +13 -14
- alita_sdk/tools/github/github_client.py +224 -100
- alita_sdk/tools/github/graphql_client_wrapper.py +119 -33
- alita_sdk/tools/github/schemas.py +14 -5
- alita_sdk/tools/github/tool.py +5 -1
- alita_sdk/tools/github/tool_prompts.py +9 -22
- alita_sdk/tools/gitlab/__init__.py +15 -11
- alita_sdk/tools/gitlab/api_wrapper.py +207 -41
- alita_sdk/tools/gitlab_org/__init__.py +10 -8
- alita_sdk/tools/gitlab_org/api_wrapper.py +63 -64
- alita_sdk/tools/google/bigquery/__init__.py +13 -12
- alita_sdk/tools/google/bigquery/tool.py +5 -1
- alita_sdk/tools/google_places/__init__.py +10 -8
- alita_sdk/tools/google_places/api_wrapper.py +1 -1
- alita_sdk/tools/jira/__init__.py +17 -11
- alita_sdk/tools/jira/api_wrapper.py +91 -40
- alita_sdk/tools/keycloak/__init__.py +11 -8
- alita_sdk/tools/localgit/__init__.py +9 -3
- alita_sdk/tools/localgit/local_git.py +62 -54
- alita_sdk/tools/localgit/tool.py +5 -1
- alita_sdk/tools/memory/__init__.py +11 -3
- alita_sdk/tools/non_code_indexer_toolkit.py +1 -0
- alita_sdk/tools/ocr/__init__.py +11 -8
- alita_sdk/tools/openapi/__init__.py +490 -114
- alita_sdk/tools/openapi/api_wrapper.py +1368 -0
- alita_sdk/tools/openapi/tool.py +20 -0
- alita_sdk/tools/pandas/__init__.py +20 -12
- alita_sdk/tools/pandas/api_wrapper.py +38 -25
- alita_sdk/tools/pandas/dataframe/generator/base.py +3 -1
- alita_sdk/tools/postman/__init__.py +11 -11
- alita_sdk/tools/pptx/__init__.py +10 -9
- alita_sdk/tools/pptx/pptx_wrapper.py +1 -1
- alita_sdk/tools/qtest/__init__.py +30 -10
- alita_sdk/tools/qtest/api_wrapper.py +430 -13
- alita_sdk/tools/rally/__init__.py +10 -8
- alita_sdk/tools/rally/api_wrapper.py +1 -1
- alita_sdk/tools/report_portal/__init__.py +12 -9
- alita_sdk/tools/salesforce/__init__.py +10 -9
- alita_sdk/tools/servicenow/__init__.py +17 -14
- alita_sdk/tools/servicenow/api_wrapper.py +1 -1
- alita_sdk/tools/sharepoint/__init__.py +10 -8
- alita_sdk/tools/sharepoint/api_wrapper.py +4 -4
- alita_sdk/tools/slack/__init__.py +10 -8
- alita_sdk/tools/slack/api_wrapper.py +2 -2
- alita_sdk/tools/sql/__init__.py +11 -9
- alita_sdk/tools/testio/__init__.py +10 -8
- alita_sdk/tools/testrail/__init__.py +11 -8
- alita_sdk/tools/testrail/api_wrapper.py +1 -1
- alita_sdk/tools/utils/__init__.py +9 -4
- alita_sdk/tools/utils/content_parser.py +77 -3
- alita_sdk/tools/utils/text_operations.py +410 -0
- alita_sdk/tools/utils/tool_prompts.py +79 -0
- alita_sdk/tools/vector_adapters/VectorStoreAdapter.py +17 -13
- alita_sdk/tools/xray/__init__.py +12 -9
- alita_sdk/tools/yagmail/__init__.py +9 -3
- alita_sdk/tools/zephyr/__init__.py +9 -7
- alita_sdk/tools/zephyr_enterprise/__init__.py +11 -8
- alita_sdk/tools/zephyr_essential/__init__.py +10 -8
- alita_sdk/tools/zephyr_essential/api_wrapper.py +30 -13
- alita_sdk/tools/zephyr_essential/client.py +2 -2
- alita_sdk/tools/zephyr_scale/__init__.py +11 -9
- alita_sdk/tools/zephyr_scale/api_wrapper.py +2 -2
- alita_sdk/tools/zephyr_squad/__init__.py +10 -8
- {alita_sdk-0.3.462.dist-info → alita_sdk-0.3.627.dist-info}/METADATA +147 -7
- alita_sdk-0.3.627.dist-info/RECORD +468 -0
- alita_sdk-0.3.627.dist-info/entry_points.txt +2 -0
- alita_sdk-0.3.462.dist-info/RECORD +0 -384
- alita_sdk-0.3.462.dist-info/entry_points.txt +0 -2
- {alita_sdk-0.3.462.dist-info → alita_sdk-0.3.627.dist-info}/WHEEL +0 -0
- {alita_sdk-0.3.462.dist-info → alita_sdk-0.3.627.dist-info}/licenses/LICENSE +0 -0
- {alita_sdk-0.3.462.dist-info → alita_sdk-0.3.627.dist-info}/top_level.txt +0 -0
|
@@ -2,7 +2,7 @@ import builtins
|
|
|
2
2
|
import json
|
|
3
3
|
import logging
|
|
4
4
|
import re
|
|
5
|
-
from pydantic import create_model, Field,
|
|
5
|
+
from pydantic import create_model, Field, JsonValue
|
|
6
6
|
from typing import Tuple, TypedDict, Any, Optional, Annotated
|
|
7
7
|
from langchain_core.messages import AnyMessage
|
|
8
8
|
from langgraph.graph import add_messages
|
|
@@ -12,6 +12,52 @@ from ...runtime.langchain.constants import ELITEA_RS, PRINTER_NODE_RS
|
|
|
12
12
|
logger = logging.getLogger(__name__)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def extract_text_from_completion(completion) -> str:
|
|
16
|
+
"""Extract text content from LLM completion, handling both string and list formats.
|
|
17
|
+
|
|
18
|
+
For thinking-enabled models (like Claude with extended thinking), completion.content
|
|
19
|
+
can be a list of content blocks. This function extracts only the text blocks and
|
|
20
|
+
concatenates them into a single string.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
completion: LLM completion object with content attribute
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
str: Extracted text content (never a list)
|
|
27
|
+
"""
|
|
28
|
+
if not hasattr(completion, 'content'):
|
|
29
|
+
return ""
|
|
30
|
+
|
|
31
|
+
content = completion.content
|
|
32
|
+
|
|
33
|
+
# Handle list of content blocks (Anthropic extended thinking format)
|
|
34
|
+
if isinstance(content, list):
|
|
35
|
+
text_blocks = []
|
|
36
|
+
|
|
37
|
+
for block in content:
|
|
38
|
+
if isinstance(block, dict):
|
|
39
|
+
block_type = block.get('type', '')
|
|
40
|
+
if block_type == 'text':
|
|
41
|
+
text_blocks.append(block.get('text', ''))
|
|
42
|
+
elif block_type == 'thinking':
|
|
43
|
+
# Skip thinking blocks - we only want the actual text response
|
|
44
|
+
continue
|
|
45
|
+
elif hasattr(block, 'type'):
|
|
46
|
+
# Handle object format
|
|
47
|
+
if block.type == 'text':
|
|
48
|
+
text_blocks.append(getattr(block, 'text', ''))
|
|
49
|
+
# Skip thinking blocks
|
|
50
|
+
|
|
51
|
+
return '\n\n'.join(text_blocks) if text_blocks else ""
|
|
52
|
+
|
|
53
|
+
# Handle simple string content
|
|
54
|
+
elif isinstance(content, str):
|
|
55
|
+
return content
|
|
56
|
+
|
|
57
|
+
# Fallback
|
|
58
|
+
return str(content) if content else ""
|
|
59
|
+
|
|
60
|
+
|
|
15
61
|
def _find_json_bounds(json_string: str) -> Tuple[int, int] | Tuple[None, None]:
|
|
16
62
|
stack = []
|
|
17
63
|
json_start = None
|
|
@@ -208,21 +254,42 @@ def safe_format(template, mapping):
|
|
|
208
254
|
def create_pydantic_model(model_name: str, variables: dict[str, dict]):
|
|
209
255
|
fields = {}
|
|
210
256
|
for var_name, var_data in variables.items():
|
|
211
|
-
|
|
257
|
+
if 'default' in var_data:
|
|
258
|
+
# allow user to define if it is required or not
|
|
259
|
+
fields[var_name] = (parse_pydantic_type(var_data['type']),
|
|
260
|
+
Field(description=var_data.get('description', None), default=var_data.get('default')))
|
|
261
|
+
else:
|
|
262
|
+
fields[var_name] = (parse_pydantic_type(var_data['type']), Field(description=var_data.get('description', None)))
|
|
212
263
|
return create_model(model_name, **fields)
|
|
213
264
|
|
|
214
265
|
def parse_pydantic_type(type_name: str):
|
|
215
|
-
""
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
266
|
+
t = (type_name or "any").strip().lower()
|
|
267
|
+
|
|
268
|
+
base = {
|
|
269
|
+
"str": str,
|
|
270
|
+
"int": int,
|
|
271
|
+
"float": float,
|
|
272
|
+
"bool": bool,
|
|
273
|
+
# "dict" means JSON object
|
|
274
|
+
"dict": dict[str, JsonValue],
|
|
275
|
+
# "list" means array of JSON values (or pick str if you want)
|
|
276
|
+
"list": list[JsonValue],
|
|
277
|
+
# IMPORTANT: don't return bare Any -> it produces {} schema
|
|
278
|
+
"any": JsonValue,
|
|
227
279
|
}
|
|
228
|
-
|
|
280
|
+
if t in base:
|
|
281
|
+
return base[t]
|
|
282
|
+
|
|
283
|
+
m = re.fullmatch(r"list\[(.+)\]", t)
|
|
284
|
+
if m:
|
|
285
|
+
return list[parse_pydantic_type(m.group(1))]
|
|
286
|
+
|
|
287
|
+
m = re.fullmatch(r"dict\[(.+?),(.+)\]", t)
|
|
288
|
+
if m:
|
|
289
|
+
k = parse_pydantic_type(m.group(1))
|
|
290
|
+
v = parse_pydantic_type(m.group(2))
|
|
291
|
+
# restrict keys to str for JSON objects
|
|
292
|
+
return dict[str, v] if k is not str else dict[str, v]
|
|
293
|
+
|
|
294
|
+
# fallback: avoid Any
|
|
295
|
+
return JsonValue
|
|
@@ -105,8 +105,7 @@ class PreloadedChatModel(BaseChatModel): # pylint: disable=R0903
|
|
|
105
105
|
model_name: str = ""
|
|
106
106
|
max_tokens: Optional[int] = 256
|
|
107
107
|
temperature: Optional[float] = 0.9
|
|
108
|
-
|
|
109
|
-
top_k: Optional[int] = 20
|
|
108
|
+
reasoning_effort: Optional[str] = None
|
|
110
109
|
token_limit: Optional[int] = 1024
|
|
111
110
|
|
|
112
111
|
_local_streams: Any = PrivateAttr()
|
|
@@ -252,8 +251,7 @@ class PreloadedChatModel(BaseChatModel): # pylint: disable=R0903
|
|
|
252
251
|
"return_full_text": False,
|
|
253
252
|
"temperature": self.temperature,
|
|
254
253
|
"do_sample": True,
|
|
255
|
-
"
|
|
256
|
-
"top_p": self.top_p,
|
|
254
|
+
"reasoning_effort": self.reasoning_effort
|
|
257
255
|
}
|
|
258
256
|
#
|
|
259
257
|
try:
|
|
@@ -302,8 +300,6 @@ class PreloadedChatModel(BaseChatModel): # pylint: disable=R0903
|
|
|
302
300
|
"return_full_text": False,
|
|
303
301
|
"temperature": self.temperature,
|
|
304
302
|
"do_sample": True,
|
|
305
|
-
"top_k": self.top_k,
|
|
306
|
-
"top_p": self.top_p,
|
|
307
303
|
}
|
|
308
304
|
#
|
|
309
305
|
while True:
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Skills Registry system for alita_sdk.
|
|
3
|
+
|
|
4
|
+
This package provides a comprehensive skills registry system that supports
|
|
5
|
+
both graph-based and agent-based skills with isolated execution and
|
|
6
|
+
callback support.
|
|
7
|
+
|
|
8
|
+
Key Components:
|
|
9
|
+
- models: Core data models and types
|
|
10
|
+
- discovery: Skill discovery from filesystem
|
|
11
|
+
- registry: Thread-safe registry service
|
|
12
|
+
- executor: Skill execution with isolation
|
|
13
|
+
- callbacks: Event system for execution transparency
|
|
14
|
+
|
|
15
|
+
Usage:
|
|
16
|
+
from alita_sdk.runtime.skills import get_default_registry
|
|
17
|
+
|
|
18
|
+
registry = get_default_registry()
|
|
19
|
+
skills = registry.list()
|
|
20
|
+
skill = registry.get("my_skill")
|
|
21
|
+
|
|
22
|
+
# Execute skill through SkillRouterTool or direct execution
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
from .models import (
|
|
26
|
+
SkillMetadata,
|
|
27
|
+
SkillType,
|
|
28
|
+
SkillSource,
|
|
29
|
+
ExecutionMode,
|
|
30
|
+
SkillStatus,
|
|
31
|
+
SkillEventType,
|
|
32
|
+
ExecutionConfig,
|
|
33
|
+
ResultsConfig,
|
|
34
|
+
SkillInputSchema,
|
|
35
|
+
SkillOutputSchema,
|
|
36
|
+
SkillExecutionResult,
|
|
37
|
+
SkillOutputFile,
|
|
38
|
+
SkillEvent,
|
|
39
|
+
SkillValidationError,
|
|
40
|
+
SkillExecutionError
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
from .discovery import SkillDiscovery
|
|
44
|
+
from .registry import SkillsRegistry, get_default_registry, reset_default_registry
|
|
45
|
+
from .executor import SkillExecutor
|
|
46
|
+
from .input_builder import SkillInputBuilder
|
|
47
|
+
from .callbacks import (
|
|
48
|
+
SkillCallback, CallbackManager, LoggingCallback, ProgressCallback,
|
|
49
|
+
FileCallback, SkillLangChainCallback, CallbackEmitter,
|
|
50
|
+
create_default_callbacks, create_debug_callbacks
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
__all__ = [
|
|
54
|
+
# Core models
|
|
55
|
+
"SkillMetadata",
|
|
56
|
+
"SkillType",
|
|
57
|
+
"SkillSource",
|
|
58
|
+
"ExecutionMode",
|
|
59
|
+
"SkillStatus",
|
|
60
|
+
"SkillEventType",
|
|
61
|
+
"ExecutionConfig",
|
|
62
|
+
"ResultsConfig",
|
|
63
|
+
"SkillInputSchema",
|
|
64
|
+
"SkillOutputSchema",
|
|
65
|
+
"SkillExecutionResult",
|
|
66
|
+
"SkillOutputFile",
|
|
67
|
+
"SkillEvent",
|
|
68
|
+
|
|
69
|
+
# Exceptions
|
|
70
|
+
"SkillValidationError",
|
|
71
|
+
"SkillExecutionError",
|
|
72
|
+
|
|
73
|
+
# Services
|
|
74
|
+
"SkillDiscovery",
|
|
75
|
+
"SkillsRegistry",
|
|
76
|
+
"get_default_registry",
|
|
77
|
+
"reset_default_registry",
|
|
78
|
+
"SkillExecutor",
|
|
79
|
+
"SkillInputBuilder",
|
|
80
|
+
|
|
81
|
+
# Callbacks
|
|
82
|
+
"SkillCallback",
|
|
83
|
+
"CallbackManager",
|
|
84
|
+
"LoggingCallback",
|
|
85
|
+
"ProgressCallback",
|
|
86
|
+
"FileCallback",
|
|
87
|
+
"SkillLangChainCallback",
|
|
88
|
+
"CallbackEmitter",
|
|
89
|
+
"create_default_callbacks",
|
|
90
|
+
"create_debug_callbacks"
|
|
91
|
+
]
|