Skip to content

Commit 82b202d

Browse files
authored
fix: update skill registry creation (#2879)
1 parent 20a8e2b commit 82b202d

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

agents/skill-registry/intro_skill_registry.ipynb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,16 +336,20 @@
336336
},
337337
"outputs": [],
338338
"source": [
339+
"ts = datetime.now().strftime(\"%Y%m%d-%H%m%S\")\n",
340+
"user_skill_id = f\"math-skill-{ts}\"\n",
341+
"\n",
339342
"try:\n",
340343
" # Call create with local_path in config\n",
341344
" # By default, wait_for_completion is True, so this will block until the skill is created\n",
342345
" skill = client.skills.create(\n",
343-
" display_name=\"Sample math skill\",\n",
344-
" description=\"This skill provides functions to perform math calculations\",\n",
345-
" config={\n",
346-
" \"local_path\": \"/tmp/sample_math_skill\"\n",
347-
" }\n",
348-
" )\n",
346+
" display_name=\"Sample math skill\",\n",
347+
" description=\"This skill provides functions to perform math calculations\",\n",
348+
" config={\n",
349+
" \"skill_id\": user_skill_id,\n",
350+
" \"local_path\": \"/tmp/sample_math_skill\"\n",
351+
" }\n",
352+
" )\n",
349353
" print(f\"SUCCESS: Skill created successfully!\")\n",
350354
" print(f\"Skill Name: {skill.name}\")\n",
351355
" print(f\"Skill State: {skill.state}\")\n",

0 commit comments

Comments
 (0)