Skip to content

Commit 2a3454c

Browse files
committed
disable default search and url to fix flash-lite
1 parent 1b6e1bb commit 2a3454c

File tree

2 files changed

+61
-25
lines changed

2 files changed

+61
-25
lines changed

calcit.cirru

Lines changed: 53 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compact.cirru

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
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 |)
@@ -245,6 +243,7 @@
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
@@ -259,9 +258,13 @@
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

0 commit comments

Comments
 (0)