alita-sdk 0.3.428.post1__py3-none-any.whl → 0.3.428.post2__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.
@@ -1,10 +1,16 @@
1
- from typing import List, Literal, Optional
1
+ from typing import Dict, List, Literal, Optional
2
2
 
3
3
  from langchain_core.tools import BaseTool, BaseToolkit
4
4
  from pydantic import BaseModel, ConfigDict, Field, create_model
5
5
 
6
6
  from ..base.tool import BaseAction
7
- from .api_wrapper import FigmaApiWrapper, GLOBAL_LIMIT
7
+ from .api_wrapper import (
8
+ FigmaApiWrapper,
9
+ GLOBAL_LIMIT,
10
+ DEFAULT_FIGMA_IMAGES_PROMPT,
11
+ DEFAULT_FIGMA_SUMMARY_PROMPT,
12
+ DEFAULT_NUMBER_OF_THREADS,
13
+ )
8
14
  from ..elitea_base import filter_missconfigured_index_tools
9
15
  from ..utils import clean_string, TOOLKIT_SPLITTER, get_max_toolkit_length
10
16
  from ...configurations.figma import FigmaConfiguration
@@ -28,7 +34,14 @@ def get_tools(tool):
28
34
  collection_name=str(tool['toolkit_name']),
29
35
  doctype='doc',
30
36
  embedding_model=tool['settings'].get('embedding_model'),
31
- vectorstore_type="PGVector"
37
+ vectorstore_type="PGVector",
38
+ # figma summary/image prompt settings (toolkit-level)
39
+ # TODO disabled until new requirements
40
+ # apply_images_prompt=tool["settings"].get("apply_images_prompt"),
41
+ # images_prompt=tool["settings"].get("images_prompt"),
42
+ # apply_summary_prompt=tool["settings"].get("apply_summary_prompt"),
43
+ # summary_prompt=tool["settings"].get("summary_prompt"),
44
+ # number_of_threads=tool["settings"].get("number_of_threads"),
32
45
  )
33
46
  .get_tools()
34
47
  )
@@ -47,6 +60,39 @@ class FigmaToolkit(BaseToolkit):
47
60
  FigmaToolkit.toolkit_max_length = get_max_toolkit_length(selected_tools)
48
61
  return create_model(
49
62
  name,
63
+ # TODO disabled until new requirements
64
+ # apply_images_prompt=(Optional[bool], Field(
65
+ # description="Enable advanced image processing instructions for Figma image nodes.",
66
+ # default=True,
67
+ # )),
68
+ # images_prompt=(Optional[Dict[str, str]], Field(
69
+ # description=(
70
+ # "Instruction for how to analyze image-based nodes "
71
+ # "(screenshots, diagrams, etc.) during Figma file retrieving. "
72
+ # "Must contain a single 'prompt' key with the text."
73
+ # ),
74
+ # default=DEFAULT_FIGMA_IMAGES_PROMPT,
75
+ # )),
76
+ # apply_summary_prompt=(Optional[bool], Field(
77
+ # description="Enable LLM-based summarization over loaded Figma data.",
78
+ # default=True,
79
+ # )),
80
+ # summary_prompt=(Optional[Dict[str, str]], Field(
81
+ # description=(
82
+ # "Instruction for the LLM on how to summarize loaded Figma data. "
83
+ # "Must contain a single 'prompt' key with the text."
84
+ # ),
85
+ # default=DEFAULT_FIGMA_SUMMARY_PROMPT,
86
+ # )),
87
+ number_of_threads=(Optional[int], Field(
88
+ description=(
89
+ "Number of worker threads to use when downloading and processing Figma images. "
90
+ f"Valid values are from 1 to 5. Default is {DEFAULT_NUMBER_OF_THREADS}."
91
+ ),
92
+ default=DEFAULT_NUMBER_OF_THREADS,
93
+ ge=1,
94
+ le=5,
95
+ )),
50
96
  global_limit=(Optional[int], Field(description="Global limit", default=GLOBAL_LIMIT)),
51
97
  global_regexp=(Optional[str], Field(description="Global regex pattern", default=None)),
52
98
  selected_tools=(