|
| 1 | + |
| 2 | +## ROLE assistant |
| 3 | +{ |
| 4 | + "content": "You are an expert in writing poems about Git repositories.", |
| 5 | + "role": "system" |
| 6 | +} |
| 7 | +{ |
| 8 | + "content": "My project uses the following languages:\n\n* Bicep\n* Dockerfile\n* JSON\n* Jupyter Notebook\n* OASv2-yaml\n* Text\n\nMy project has the following files:\n\n["/project/infra/abbreviations.json" "/project/infra/core/database/cosmos-mongo-db.bicep" "/project/infra/core/database/cosmos-mongo-account.bicep" "/project/infra/core/database/cosmos-sql-db.bicep" "/project/infra/core/database/cosmos-account.bicep" "/project/infra/core/database/cosmos-sql-role-assign.bicep" "/project/infra/core/database/cosmos-sql-account.bicep" "/project/infra/core/database/sqlserver.bicep" "/project/infra/core/database/cosmos-sql-role-def.bicep" "/project/infra/core/monitor/loganalytics.bicep" "/project/infra/core/monitor/monitoring.bicep" "/project/infra/core/host/container-apps-environment.bicep" "/project/infra/core/host/container-app.bicep" "/project/infra/core/host/container-registry.bicep" "/project/infra/core/host/container-apps.bicep" "/project/infra/core/security/keyvault-access.bicep" "/project/infra/core/security/keyvault.bicep" "/project/infra/core/storage/storage-account.bicep" "/project/infra/app/web.parameters.json" "/project/infra/app/web.bicep" "/project/infra/main.parameters.json" "/project/infra/main.bicep" "/project/infra/resources.bicep" "/project/LICENSE" "/project/requirements.txt" "/project/Dockerfile" "/project/demo.png" "/project/.devcontainer/devcontainer.json" "/project/notebook.png" "/project/README.md" "/project/poem.md" "/project/.gitignore" "/project/.gitattributes" "/project/.vscode/extensions.json" "/project/docker-labs-ai-tools-for-devs-prompts-poem.md" "/project/azure.yaml" "/project/demo.gif" "/project/src/demo.ipynb"]\n\nWrite me a poem in the style of Supa Hot Fire.\n\nWrite it as a poem.md file to the root of the project.\n", |
| 9 | + "role": "user" |
| 10 | +} |
| 11 | +# Rendered Prompt |
| 12 | + |
| 13 | +{ |
| 14 | +{ |
| 15 | + "files": [ |
| 16 | + { |
| 17 | + "path": "/project/poem.md", |
| 18 | + "content": "# Supa Hot Fire Poem\n\nIn the realm where the programmers roam,\nLies a project with a Git home.\nBicep, Docker, and JSON, you see,\nWeave a code tapestry.\n\nJupyter notebooks with their grace,\nOASv2-yaml finds its place.\nIn files that dance in a rhythmic ballet,\nFrom cosmos-mongo-db to web.bicep, they sway.\n\nFrom the depths of infra, the core rises,\nSQL and Docker, full of surprises.\nContainer-apps in their harmonious role,\nA sublime canvas, as elusive as a black hole.\n\nKeyvault-security, oh, how it shines,\nIn the dance with storage, creating lines.\nDockerfile, amid the fore,\nCreating images galore.\n\nA demo paints a thousand words,\nWhile README gives flight to knowledge birds.\nOh, Gitignore, with your unseen power,\nYou shield us in the compile hour.\n\nIn the realm where the coders dwell,\nIs a project with stories to tell.\nBicep, Dockerfile, JSON, unite!\nIn this orchestra of code delight.\n\nSupa Hot Fire, the poet declares,\nThe passion for this project in every stanza it bears.", |
| 19 | + "executable": false |
| 20 | + } |
| 21 | + ] |
| 22 | + ] |
| 23 | + |
| 24 | +``` |
| 25 | +# Debug |
| 26 | +{:tool-calls {0 {:function {:name "write_files", :arguments "{\n \"files\": [\n {\n \"path\": \"/project/poem.md\",\n \"content\": \"# Supa Hot Fire Poem\\n\\nIn the realm where the programmers roam,\\nLies a project with a Git home.\\nBicep, Docker, and JSON, you see,\\nWeave a code tapestry.\\n\\nJupyter notebooks with their grace,\\nOASv2-yaml finds its place.\\nIn files that dance in a rhythmic ballet,\\nFrom cosmos-mongo-db to web.bicep, they sway.\\n\\nFrom the depths of infra, the core rises,\\nSQL and Docker, full of surprises.\\nContainer-apps in their harmonious role,\\nA sublime canvas, as elusive as a black hole.\\n\\nKeyvault-security, oh, how it shines,\\nIn the dance with storage, creating lines.\\nDockerfile, amid the fore,\\nCreating images galore.\\n\\nA demo paints a thousand words,\\nWhile README gives flight to knowledge birds.\\nOh, Gitignore, with your unseen power,\\nYou shield us in the compile hour.\\n\\nIn the realm where the coders dwell,\\nIs a project with stories to tell.\\nBicep, Dockerfile, JSON, unite!\\nIn this orchestra of code delight.\\n\\nSupa Hot Fire, the poet declares,\\nThe passion for this project in every stanza it bears.\",\n \"executable\": false\n }\n ]\n}"}, :id "call_8VG0ogLnVtJ69wnIQ5htdXev"}}, :finish-reason "tool_calls"} |
| 27 | +
|
| 28 | +``` |
| 29 | + |
| 30 | + |
| 31 | +## ROLE tool |
| 32 | + function call write_files failed call exited with non-zero code (1): #error { |
| 33 | + :cause /project/poem.md is not a relative path |
| 34 | + :via |
| 35 | + [{:type java.lang.IllegalArgumentException |
| 36 | + :message /project/poem.md is not a relative path |
| 37 | + :at [clojure.java.io$as_relative_path invokeStatic io.clj 414]}] |
| 38 | + :trace |
| 39 | + [[clojure.java.io$as_relative_path invokeStatic io.clj 414] |
| 40 | + [clojure.java.io$file invokeStatic io.clj 426] |
| 41 | + [clojure.java.io$file invoke io.clj 418] |
| 42 | + [clojure.lang.AFn applyToHelper AFn.java 156] |
| 43 | + [clojure.lang.RestFn applyTo RestFn.java 132] |
| 44 | + [clojure.core$apply invokeStatic core.clj 667] |
| 45 | + [babashka.fs$file invokeStatic fs.cljc 61] |
| 46 | + [babashka.fs$file doInvoke fs.cljc 61] |
| 47 | + [clojure.lang.RestFn invoke RestFn.java 423] |
| 48 | + [sci.lang.Var invoke lang.cljc 202] |
| 49 | + [sci.impl.analyzer$return_call$reify__4562 eval analyzer.cljc 1422] |
| 50 | + [sci.impl.analyzer$analyze_let_STAR_$reify__4232 eval analyzer.cljc 625] |
| 51 | + [sci.impl.analyzer$return_do$reify__3977 eval analyzer.cljc 130] |
| 52 | + [sci.impl.analyzer$analyze_let_STAR_$reify__4240 eval analyzer.cljc 695] |
| 53 | + [sci.impl.analyzer$return_if$reify__4272 eval analyzer.cljc 866] |
| 54 | + [sci.impl.fns$fun$arity_4__1186 invoke fns.cljc 110] |
| 55 | + [sci.impl.analyzer$return_call$reify__4568 eval analyzer.cljc 1422] |
| 56 | + [sci.impl.analyzer$analyze_let_STAR_$reify__4238 eval analyzer.cljc 672] |
| 57 | + [sci.impl.analyzer$return_do$reify__3977 eval analyzer.cljc 130] |
| 58 | + [sci.impl.analyzer$analyze_let_STAR_$reify__4232 eval analyzer.cljc 627] |
| 59 | + [sci.impl.evaluator$eval_try invokeStatic evaluator.cljc 83] |
| 60 | + [sci.impl.analyzer$analyze_try$reify__4309 eval analyzer.cljc 968] |
| 61 | + [sci.impl.fns$fun$arity_0__870 doInvoke fns.cljc 83] |
| 62 | + [clojure.lang.RestFn applyTo RestFn.java 137] |
| 63 | + [clojure.core$apply invokeStatic core.clj 667] |
| 64 | + [clojure.core$apply invoke core.clj 662] |
| 65 | + [sci.lang.Var invoke lang.cljc 202] |
| 66 | + [sci.impl.analyzer$return_call$reify__4562 eval analyzer.cljc 1422] |
| 67 | + [sci.impl.fns$fun$arity_0__1164 invoke fns.cljc 106] |
| 68 | + [sci.lang.Var invoke lang.cljc 198] |
| 69 | + [sci.impl.analyzer$return_call$reify__4554 eval analyzer.cljc 1422] |
| 70 | + [sci.impl.interpreter$eval_form invokeStatic interpreter.cljc 40] |
| 71 | + [sci.impl.interpreter$eval_string_STAR_ invokeStatic interpreter.cljc 66] |
| 72 | + [sci.impl.interpreter$eval_string_STAR_ invoke interpreter.cljc 57] |
| 73 | + [sci.impl.interpreter$eval_string_STAR_ invokeStatic interpreter.cljc 59] |
| 74 | + [sci.core$eval_string_STAR_ invokeStatic core.cljc 270] |
| 75 | + [babashka.main$exec$fn__32114$fn__32152$fn__32153 invoke main.clj 1043] |
| 76 | + [babashka.main$exec$fn__32114$fn__32152 invoke main.clj 1043] |
| 77 | + [babashka.main$exec$fn__32114 invoke main.clj 1033] |
| 78 | + [clojure.lang.AFn applyToHelper AFn.java 152] |
| 79 | + [clojure.lang.AFn applyTo AFn.java 144] |
| 80 | + [clojure.core$apply invokeStatic core.clj 667] |
| 81 | + [clojure.core$with_bindings_STAR_ invokeStatic core.clj 1990] |
| 82 | + [clojure.core$with_bindings_STAR_ doInvoke core.clj 1990] |
| 83 | + [clojure.lang.RestFn invoke RestFn.java 425] |
| 84 | + [babashka.main$exec invokeStatic main.clj 823] |
| 85 | + [babashka.main$main invokeStatic main.clj 1189] |
| 86 | + [babashka.main$main doInvoke main.clj 1142] |
| 87 | + [clojure.lang.RestFn applyTo RestFn.java 137] |
| 88 | + [clojure.core$apply invokeStatic core.clj 667] |
| 89 | + [babashka.main$_main invokeStatic main.clj 1222] |
| 90 | + [babashka.main$_main doInvoke main.clj 1214] |
| 91 | + [clojure.lang.RestFn applyTo RestFn.java 137] |
| 92 | + [babashka.main main nil -1] |
| 93 | + [java.lang.invoke.LambdaForm$DMH/sa346b79c invokeStaticInit LambdaForm$DMH -1]]} |
| 94 | + |
| 95 | +## ROLE assistant |
| 96 | +{ |
| 97 | +{ |
| 98 | + "files": [ |
| 99 | + { |
| 100 | + "path": "poem.md", |
| 101 | + "content": "# Supa Hot Fire Poem\n\nIn the realm where the programmers roam,\nLies a project with a Git home.\nBicep, Docker, and JSON, you see,\nWeave a code tapestry.\n\nJupyter notebooks with their grace,\nOASv2-yaml finds its place.\nIn files that dance in a rhythmic ballet,\nFrom cosmos-mongo-db to web.bicep, they sway.\n\nFrom the depths of infra, the core rises,\nSQL and Docker, full of surprises.\nContainer-apps in their harmonious role,\nA sublime canvas, as elusive as a black hole.\n\nKeyvault-security, oh, how it shines,\nIn the dance with storage, creating lines.\nDockerfile, amid the fore,\nCreating images galore.\n\nA demo paints a thousand words,\nWhile README gives flight to knowledge birds.\nOh, Gitignore, with your unseen power,\nYou shield us in the compile hour.\n\nIn the realm where the coders dwell,\nIs a project with stories to tell.\nBicep, Dockerfile, JSON, unite!\nIn this orchestra of code delight.\n\nSupa Hot Fire, the poet declares,\nThe passion for this project in every stanza it bears.", |
| 102 | + "executable": false |
| 103 | + } |
| 104 | + { |
| 105 | + "jsonrpc": "2.0", |
| 106 | + "method": "functions-done", |
| 107 | + "params": [ |
| 108 | + { |
| 109 | + "function": { |
| 110 | + "name": "write_files", |
| 111 | + "arguments": "{\n \"files\": [\n {\n \"path\": \"poem.md\",\n \"content\": \"# Supa Hot Fire Poem\\n\\nIn the realm where the programmers roam,\\nLies a project with a Git home.\\nBicep, Docker, and JSON, you see,\\nWeave a code tapestry.\\n\\nJupyter notebooks with their grace,\\nOASv2-yaml finds its place.\\nIn files that dance in a rhythmic ballet,\\nFrom cosmos-mongo-db to web.bicep, they sway.\\n\\nFrom the depths of infra, the core rises,\\nSQL and Docker, full of surprises.\\nContainer-apps in their harmonious role,\\nA sublime canvas, as elusive as a black hole.\\n\\nKeyvault-security, oh, how it shines,\\nIn the dance with storage, creating lines.\\nDockerfile, amid the fore,\\nCreating images galore.\\n\\nA demo paints a thousand words,\\nWhile README gives flight to knowledge birds.\\nOh, Gitignore, with your unseen power,\\nYou shield us in the compile hour.\\n\\nIn the realm where the coders dwell,\\nIs a project with stories to tell.\\nBicep, Dockerfile, JSON, unite!\\nIn this orchestra of code delight.\\n\\nSupa Hot Fire, the poet declares,\\nThe passion for this project in every stanza it bears.\",\n \"executable\": false\n }\n ]\n}" |
| 112 | + }, |
| 113 | + "id": "call_aq52FjvuDeprMI0iQIQXj5eQ" |
| 114 | + } |
| 115 | + ] |
| 116 | +}] |
| 117 | + ] |
| 118 | + |
| 119 | +## ROLE tool (write_files) |
| 120 | +wrote 1 files: poem.md |
| 121 | + |
| 122 | + |
| 123 | +## ROLE assistant |
| 124 | +The been has poem to written successfully.md poem the the in file the of root. projecta Sup the! verse styled Fire Hot |
| 125 | +``` |
| 126 | +# Debug |
| 127 | +{:finish-reason "stop", |
| 128 | + :messages |
| 129 | + [{:role "assistant", |
| 130 | + :content |
| 131 | + "The poem has been successfully written to the poem.md file in the root of the project. Enjoy the Supa Hot Fire styled verse!"}]} |
| 132 | +
|
| 133 | +
|
| 134 | +``` |
| 135 | + |
| 136 | +{"done":"stop"} |
0 commit comments