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 1414 {:name " analyze_project" ,
1515 :description " Analyze a project to determine how it should be built" ,
1616 :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" }
1818 {:name " write_files" ,
1919 :description " Write a set of files to my project" ,
2020 :parameters {:type " object" ,
Original file line number Diff line number Diff line change 11# Running prompts
22
3+ ### help
4+
5+ ``` sh
6+ bb -m prompts --help
7+ ```
8+
39### Plain prompt Generation
410
511``` sh
Original file line number Diff line number Diff line change 276276 [nil " --thread-id THREAD_ID" " use this thread-id for the next conversation"
277277 :assoc-fn (fn [m k v] (assoc m k v :save-thread-volume true ))]
278278 [nil " --model MODEL" " use this model on the openai compatible endpoint" ]
279- [nil " --stream" " disable streaming "
279+ [nil " --stream" " stream responses "
280280 :id :stream
281281 :default true
282282 :assoc-fn (fn [m k _] (assoc m k true ))]
283- [nil " --nostream" " disable streaming"
283+ [nil " --nostream" " disable streaming responses "
284284 :id :stream
285285 :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" ]])
287288
288289(def output-handler (fn [x] (jsonrpc/notify :message {:content (json/generate-string x)})))
289290(defn output-prompts [coll]
370371 " Errors: {{errors}}\n Summary:\n {{summary}}"
371372 {:summary summary :errors (string/join " \n " errors)})
372373 (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 ))))))
379384 (catch Throwable t
380385 (warn " Error: {{ exception }}" {:exception t})
381386 (System/exit 1 ))))
You can’t perform that action at this time.
0 commit comments