Class AnthropicApi.SkillContainer.SkillContainerBuilder
java.lang.Object
org.springframework.ai.anthropic.api.AnthropicApi.SkillContainer.SkillContainerBuilder
- Enclosing class:
AnthropicApi.SkillContainer
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Mariusz Bernacki, Thomas Vitale, Jihoon Kim, Alexandros Pappas, Jonghoon Park, Claudio Silva Junior, Filip Hrisafov, Soby Chacko, Austin Dase
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.anthropicSkill(AnthropicApi.AnthropicSkill skill, String version) Deprecated.Useskill(AnthropicSkill, String)insteadbuild()customSkill(String skillId) Deprecated.Useskill(String)insteadcustomSkill(String skillId, String version) Deprecated.Useskill(String, String)insteadAdd a skill by its ID or name.Add a skill by its ID or name with a specific version.skill(AnthropicApi.AnthropicSkill skill) Add a pre-built Anthropic skill using the enum.skill(AnthropicApi.AnthropicSkill skill, String version) Add a pre-built Anthropic skill with a specific version.skill(AnthropicApi.Skill skill) Add a Skill record directly.Add multiple skills by their IDs or names.Add multiple skills from a list of IDs or names.
-
Constructor Details
-
SkillContainerBuilder
public SkillContainerBuilder()
-
-
Method Details
-
skill
Add a skill by its ID or name. Automatically detects whether it's a pre-built Anthropic skill (xlsx, pptx, docx, pdf) or a custom skill ID.- Parameters:
skillIdOrName- The skill ID or name- Returns:
- this builder
-
skill
public AnthropicApi.SkillContainer.SkillContainerBuilder skill(String skillIdOrName, String version) Add a skill by its ID or name with a specific version.- Parameters:
skillIdOrName- The skill ID or nameversion- The version (e.g., "latest", "20251013")- Returns:
- this builder
-
skill
Add a pre-built Anthropic skill using the enum.- Parameters:
skill- The Anthropic skill enum value- Returns:
- this builder
-
skill
public AnthropicApi.SkillContainer.SkillContainerBuilder skill(AnthropicApi.AnthropicSkill skill, String version) Add a pre-built Anthropic skill with a specific version.- Parameters:
skill- The Anthropic skill enum valueversion- The version- Returns:
- this builder
-
skill
Add a Skill record directly.- Parameters:
skill- The skill record- Returns:
- this builder
-
skills
Add multiple skills by their IDs or names.- Parameters:
skillIds- The skill IDs or names- Returns:
- this builder
-
skills
Add multiple skills from a list of IDs or names.- Parameters:
skillIds- The list of skill IDs or names- Returns:
- this builder
-
anthropicSkill
@Deprecated public AnthropicApi.SkillContainer.SkillContainerBuilder anthropicSkill(AnthropicApi.AnthropicSkill skill) Deprecated.Useskill(AnthropicSkill)insteadAdd a pre-built Anthropic skill.- Parameters:
skill- The Anthropic skill enum value- Returns:
- this builder
-
anthropicSkill
@Deprecated public AnthropicApi.SkillContainer.SkillContainerBuilder anthropicSkill(AnthropicApi.AnthropicSkill skill, String version) Deprecated.Useskill(AnthropicSkill, String)insteadAdd a pre-built Anthropic skill with version.- Parameters:
skill- The Anthropic skill enum valueversion- The version- Returns:
- this builder
-
customSkill
Deprecated.Useskill(String)insteadAdd a custom skill by ID.- Parameters:
skillId- The custom skill ID- Returns:
- this builder
-
customSkill
@Deprecated public AnthropicApi.SkillContainer.SkillContainerBuilder customSkill(String skillId, String version) Deprecated.Useskill(String, String)insteadAdd a custom skill with version.- Parameters:
skillId- The custom skill IDversion- The version- Returns:
- this builder
-
build
-
skill(AnthropicSkill)instead