From fc89ea47e55339c499e7f88bf9bc08b4931e2ee6 Mon Sep 17 00:00:00 2001 From: Jim Clark Date: Thu, 16 Jan 2025 23:12:27 -0800 Subject: [PATCH] Add examples --- docs/content/tools/_index.md | 9 ++---- docs/content/tools/docs/_index.md | 2 +- docs/content/tools/docs/quickstart.md | 6 ---- docs/content/tools/examples/_index.md | 7 +++++ docs/content/tools/examples/curl.md | 23 ++++++++++++++++ docs/content/tools/examples/ffmpeg.md | 38 ++++++++++++++++++++++++++ docs/content/tools/examples/swagger.md | 23 ++++++++++++++++ docs/content/tools/mcp.md | 3 -- docs/content/tools/quickstart.md | 12 ++++++++ docs/hugo.yaml | 4 +++ prompts/examples/curl.md | 4 ++- prompts/examples/swagger.md | 11 ++++++++ 12 files changed, 125 insertions(+), 17 deletions(-) delete mode 100644 docs/content/tools/docs/quickstart.md create mode 100644 docs/content/tools/examples/_index.md create mode 100644 docs/content/tools/examples/curl.md create mode 100644 docs/content/tools/examples/ffmpeg.md create mode 100644 docs/content/tools/examples/swagger.md delete mode 100644 docs/content/tools/mcp.md create mode 100644 docs/content/tools/quickstart.md create mode 100644 prompts/examples/swagger.md diff --git a/docs/content/tools/_index.md b/docs/content/tools/_index.md index a3868f3..d103c4a 100644 --- a/docs/content/tools/_index.md +++ b/docs/content/tools/_index.md @@ -1,10 +1,7 @@ --- -title: Tools For Devs +title: MCP/run Toolbox weight: 1 +cascade: + type: docs --- -## AI Tools for Dev - - - -## Model Context Protocol diff --git a/docs/content/tools/docs/_index.md b/docs/content/tools/docs/_index.md index a259453..138128b 100644 --- a/docs/content/tools/docs/_index.md +++ b/docs/content/tools/docs/_index.md @@ -1,5 +1,5 @@ --- -title: Tools Project Documentation +title: Documentation --- diff --git a/docs/content/tools/docs/quickstart.md b/docs/content/tools/docs/quickstart.md deleted file mode 100644 index f147366..0000000 --- a/docs/content/tools/docs/quickstart.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Quick Start -weight: 1 ---- - - diff --git a/docs/content/tools/examples/_index.md b/docs/content/tools/examples/_index.md new file mode 100644 index 0000000..8aab929 --- /dev/null +++ b/docs/content/tools/examples/_index.md @@ -0,0 +1,7 @@ +--- +title: example prompts +--- + +* [Use curl to fetch your GitHub gists](curl) +* [call swagger api](swagger) +* [create an animaged gif using ffmpeg](ffmpeg) diff --git a/docs/content/tools/examples/curl.md b/docs/content/tools/examples/curl.md new file mode 100644 index 0000000..abf2704 --- /dev/null +++ b/docs/content/tools/examples/curl.md @@ -0,0 +1,23 @@ +--- +title: curl +--- + +# Description + +Fetch gists from your user from GitHub + +# Prompt Code + +```markdown +--- +tools: + - name: curl +parameter-values: + user: slimslenderslacks +--- + +# prompt + +Run the curl command, in silent mode, to fetch gists for user {{user}} from GitHub. +``` + diff --git a/docs/content/tools/examples/ffmpeg.md b/docs/content/tools/examples/ffmpeg.md new file mode 100644 index 0000000..019af5f --- /dev/null +++ b/docs/content/tools/examples/ffmpeg.md @@ -0,0 +1,38 @@ +--- +title: use ffmpeg +--- + +# Description + +Use ffmpeg to convert an mp4 file to an animated gif. + +Users must refer to the mp4 file using a relative path from the working directory they've given to the mcp +bridge server. + +# Prompt Code + +```markdown +--- +tools: + - name: ffmpeg + description: run the ffmpeg command + parameters: + type: object + properties: + args: + description: arguments to pass to ffmpeg + type: array + items: + type: string + container: + image: linuxserver/ffmpeg:version-7.1-cli + command: + - "{{args|into}}" +--- + +# prompt + +Use ffmpeg to convert the file UsingPuppeteer.mp4 into an animated gif file at 1 frame per second. +The output file should be named UsingPuppeteer.gif. +``` + diff --git a/docs/content/tools/examples/swagger.md b/docs/content/tools/examples/swagger.md new file mode 100644 index 0000000..11a5fda --- /dev/null +++ b/docs/content/tools/examples/swagger.md @@ -0,0 +1,23 @@ +--- +title: call swagger api +--- + +# Description + +Describe a two step process where we first grab a swagger.json file from the web and then use +that to make an api call. + +# Prompt Code + +```markdown +--- +tools: + - name: curl +--- + +# prompt + +Use curl to fetch the openai spec at https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json +Then use curl to get all authors from the api. +``` + diff --git a/docs/content/tools/mcp.md b/docs/content/tools/mcp.md deleted file mode 100644 index 5187ea4..0000000 --- a/docs/content/tools/mcp.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -title: Model Context Protocol ---- diff --git a/docs/content/tools/quickstart.md b/docs/content/tools/quickstart.md new file mode 100644 index 0000000..45e0601 --- /dev/null +++ b/docs/content/tools/quickstart.md @@ -0,0 +1,12 @@ +--- +title: Quick Start +weight: 1 +--- + +{{% steps %}} + +### Step 1 + +### second + +{{% /steps %}} diff --git a/docs/hugo.yaml b/docs/hugo.yaml index 30592e7..1453389 100644 --- a/docs/hugo.yaml +++ b/docs/hugo.yaml @@ -9,3 +9,7 @@ menu: url: "https://github.com/docker/labs-ai-tools-for-devs" params: icon: github +markup: + goldmark: + renderer: + unsafe: true diff --git a/prompts/examples/curl.md b/prompts/examples/curl.md index 90bc2dc..7f07b7c 100644 --- a/prompts/examples/curl.md +++ b/prompts/examples/curl.md @@ -2,9 +2,11 @@ model: claude-3-5-sonnet-20241022 tools: - name: curl +parameter-values: + user: slimslenderslacks --- # prompt -Run the curl command, in silent mode, to fetch gists for user slimslenderslacks from GitHub. +Run the curl command, in silent mode, to fetch gists for user {{user}} from GitHub. diff --git a/prompts/examples/swagger.md b/prompts/examples/swagger.md new file mode 100644 index 0000000..f6fe24a --- /dev/null +++ b/prompts/examples/swagger.md @@ -0,0 +1,11 @@ +--- +model: claude-3-5-sonnet-20241022 +tools: + - name: curl +--- + +# prompt + +Use curl to fetch the openai spec at https://fakerestapi.azurewebsites.net/swagger/v1/swagger.json +Then use curl to get all authors from the api. +