Files
aitest/8-skill.md
2026-03-16 08:08:29 +00:00

27 lines
836 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
```
curl -X POST 'https://api.openai.com/v1/skills' -H "Authorization: Bearer $OPENAI_API_KEY" -F 'files[]=@./contacts/SKILL.md;filename=contacts/SKILL.md;type=text/markdown''
{
"id": "skill_69b7aab7a0988191afca6ad2c530326b07c9ae27b6429c7c",
"object": "skill",
"created_at": 1773644471,
"default_version": "1",
"description": "My contact list",
"latest_version": "1",
"name": "contacts"
}
<07:01:11#root@codespaces-5a7969=23.97.62.113^x86_64,Linux,Debtrixie/sid:/workspaces/my-default-codespace/aitest>#
```
注意,必须只有一级目录,不能有子目录 skills/contacts/skill.md否则会报错
```
{
"error": {
"message": "Exactly one of SKILL.md or Skills.md must be present in the skill root",
"type": "invalid_request_error",
"param": "files",
"code": "invalid_value"
}
}
```