Skills
Skills/tools related string generation functions.
Functions:
Name | Description |
---|---|
get_agent_skill_registration | Get an agent's skill registration string. |
export_skills | Get the skills content and secrets. |
SkillsExporter(flow_name: str, agents: List[WaldiezAgent], agent_names: Dict[str, str], skills: List[WaldiezSkill], skill_names: Dict[str, str], output_dir: Optional[Union[str, Path]] = None)
¶
Bases: BaseExporter
, ExporterMixin
Skill exporter.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
flow_name | str | The name of the flow. | required |
agents | List[WaldiezAgent] | The agents. | required |
agent_names | Dict[str, str] | The agent names. | required |
skills | List[WaldiezSkill] | The skills. | required |
skill_names | Dict[str, str] | The skill names. | required |
output_dir | Optional[Union[str, Path]] | The output directory if any, by default None | None |
Source code in waldiez/exporting/skills/skills_exporter.py
export() -> ExporterReturnType
¶
Export the skills.
Returns:
Type | Description |
---|---|
ExporterReturnType | The exported skills content, the imports, the before export strings, the after export strings, and the environment variables. |
Source code in waldiez/exporting/skills/skills_exporter.py
generate() -> Optional[str]
¶
get_after_export() -> Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]]
¶
Generate the content after the main export.
Returns:
Type | Description |
---|---|
Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]] | The exported content after the main export and its position. |
Source code in waldiez/exporting/skills/skills_exporter.py
get_before_export() -> Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]]
¶
Generate the content before the main export.
Returns:
Type | Description |
---|---|
Optional[List[Tuple[str, Union[ExportPosition, AgentPosition]]]] | The exported content before the main export and its position. |
Source code in waldiez/exporting/skills/skills_exporter.py
get_environment_variables() -> List[Tuple[str, str]]
¶
get_imports() -> List[Tuple[str, ImportPosition]]
¶
"Generate the imports string.
Returns:
Type | Description |
---|---|
Tuple[str, int] | The exported imports and the position of the imports. |