File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 14
14
{:name " analyze_project" ,
15
15
:description " Analyze a project to determine how it should be built" ,
16
16
:type " prompt" ,
17
- :ref " github:docker/labs-ai-tools-for-devs?ref=slim/args &path=prompts/project_type" }
17
+ :ref " github:docker/labs-ai-tools-for-devs?ref=main &path=prompts/project_type" }
18
18
{:name " write_files" ,
19
19
:description " Write a set of files to my project" ,
20
20
:parameters {:type " object" ,
Original file line number Diff line number Diff line change 1
1
# Running prompts
2
2
3
+ ### help
4
+
5
+ ``` sh
6
+ bb -m prompts --help
7
+ ```
8
+
3
9
### Plain prompt Generation
4
10
5
11
``` sh
Original file line number Diff line number Diff line change 276
276
[nil " --thread-id THREAD_ID" " use this thread-id for the next conversation"
277
277
:assoc-fn (fn [m k v] (assoc m k v :save-thread-volume true ))]
278
278
[nil " --model MODEL" " use this model on the openai compatible endpoint" ]
279
- [nil " --stream" " disable streaming "
279
+ [nil " --stream" " stream responses "
280
280
:id :stream
281
281
:default true
282
282
:assoc-fn (fn [m k _] (assoc m k true ))]
283
- [nil " --nostream" " disable streaming"
283
+ [nil " --nostream" " disable streaming responses "
284
284
:id :stream
285
285
:assoc-fn (fn [m k _] (assoc m k false ))]
286
- [nil " --debug" " add debug logging" ]])
286
+ [nil " --debug" " add debug logging" ]
287
+ [nil " --help" " print option summary" ]])
287
288
288
289
(def output-handler (fn [x] (jsonrpc/notify :message {:content (json/generate-string x)})))
289
290
(defn output-prompts [coll]
370
371
" Errors: {{errors}}\n Summary:\n {{summary}}"
371
372
{:summary summary :errors (string/join " \n " errors)})
372
373
(System/exit 1 ))
373
- (let [cmd (apply command options arguments)]
374
- (alter-var-root
375
- #'jsonrpc/notify
376
- (fn [_] (partial (if (:jsonrpc options) jsonrpc/-notify jsonrpc/-println) options)))
377
- ((if (:pretty-print-prompts options) output-prompts output-handler)
378
- (cmd )))))
374
+ (if (:help options)
375
+ (do
376
+ (println summary)
377
+ (System/exit 0 ))
378
+ (let [cmd (apply command options arguments)]
379
+ (alter-var-root
380
+ #'jsonrpc/notify
381
+ (fn [_] (partial (if (:jsonrpc options) jsonrpc/-notify jsonrpc/-println) options)))
382
+ ((if (:pretty-print-prompts options) output-prompts output-handler)
383
+ (cmd ))))))
379
384
(catch Throwable t
380
385
(warn " Error: {{ exception }}" {:exception t})
381
386
(System/exit 1 ))))
You can’t perform that action at this time.
0 commit comments