File tree Expand file tree Collapse file tree 2 files changed +61
-25
lines changed Expand file tree Collapse file tree 2 files changed +61
-25
lines changed Original file line number Diff line number Diff line change 88 :defs $ {}
99 |*abort-control $ %{} :CodeEntry ( :doc | )
1010 :code $ quote ( defatom *abort-control nil )
11- |*gen-ai $ %{} :CodeEntry ( :doc | )
12- :code $ quote ( defatom *gen-ai nil )
1311 |*gen-ai-new $ %{} :CodeEntry ( :doc | )
1412 :code $ quote ( defatom *gen-ai-new nil )
1513 |*image-cache $ %{} :CodeEntry ( :doc | )
245243 json? $ or ( .!includes prompt-text "\" {{json}}" ) ( .!includes prompt-text "\" {{JSON}}" )
246244 think? $ or ( .!includes prompt-text "\" {{think}}" ) ( .!includes prompt-text "\" {{THINK}}" )
247245 search? $ or ( .!includes prompt-text "\" {{search}}" ) ( .!includes prompt-text "\" {{SEARCH}}" )
246+ has-url? $ or ( .!includes prompt-text "\" http://" ) ( .!includes prompt-text "\" https://" )
248247 sdk-result $ js-await
249248 .!generateContentStream ( .-models gen-ai )
250249 js-object
259258 js-object ( :thinkingBudget 200 ) ( :includeThoughts think? )
260259 :httpOptions $ js-object
261260 :baseUrl $ get-env "\" gemini-host" "\" https://ja.chenyong.life"
262- :tools $ js-array
263- js-object $ :googleSearch ( js-object )
264- js-object $ :urlContext ( js-object )
261+ :tools $ ->
262+ js-array
263+ if search? $ js-object
264+ :googleSearch $ js-object
265+ if has-url? $ js-object
266+ :urlContext $ js-object
267+ .!filter $ fn ( x & _a ) x
265268 :abortSignal $ let
266269 abort $ new js/AbortController
267270 reset! *abort-control abort
You can’t perform that action at this time.
0 commit comments