@@ -133,12 +133,18 @@ function fetchweburlraw_run(toolcallid, toolname, obj) {
133133
134134/**
135135 * Setup fetch_web_url_raw for tool calling
136- * NOTE: Currently it just checks there is something at given proxyUrl
136+ * NOTE: Currently the logic is setup for the bundled simpleproxy.py
137137 * @param {Object<string, Object<string, any>> } tcs
138138 */
139139async function fetchweburlraw_setup ( tcs ) {
140140 // @ts -ignore
141- let got = await fetch ( `${ document [ "gMe" ] . proxyUrl } /urlraw?url=jambudweepe.multiverse.987654321123456789` ) . then ( resp => {
141+ let got = await fetch ( `${ document [ "gMe" ] . proxyUrl } /aum?url=jambudweepe.multiverse.987654321123456789` ) . then ( resp => {
142+ if ( resp . statusText != 'bharatavarshe' ) {
143+ console . log ( "WARN:ToolJS:FetchWebUrlRaw:Dont forget to run the bundled local.tools/simpleproxy.py to enable me" )
144+ return
145+ } else {
146+ console . log ( "INFO:ToolJS:FetchWebUrlRaw:Enabling..." )
147+ }
142148 tcs [ "fetch_web_url_raw" ] = {
143149 "handler" : fetchweburlraw_run ,
144150 "meta" : fetchweburlraw_meta ,
@@ -201,12 +207,18 @@ function fetchweburltext_run(toolcallid, toolname, obj) {
201207
202208/**
203209 * Setup fetch_web_url_text for tool calling
204- * NOTE: Currently it just checks there is something at given proxyUrl
210+ * NOTE: Currently the logic is setup for the bundled simpleproxy.py
205211 * @param {Object<string, Object<string, any>> } tcs
206212 */
207213async function fetchweburltext_setup ( tcs ) {
208214 // @ts -ignore
209- let got = await fetch ( `${ document [ "gMe" ] . proxyUrl } /urltext?url=jambudweepe.akashaganga.multiverse.987654321123456789` ) . then ( resp => {
215+ let got = await fetch ( `${ document [ "gMe" ] . proxyUrl } /aum?url=jambudweepe.akashaganga.multiverse.987654321123456789` ) . then ( resp => {
216+ if ( resp . statusText != 'bharatavarshe' ) {
217+ console . log ( "WARN:ToolJS:FetchWebUrlText:Dont forget to run the bundled local.tools/simpleproxy.py to enable me" )
218+ return
219+ } else {
220+ console . log ( "INFO:ToolJS:FetchWebUrlText:Enabling..." )
221+ }
210222 tcs [ "fetch_web_url_text" ] = {
211223 "handler" : fetchweburltext_run ,
212224 "meta" : fetchweburltext_meta ,
0 commit comments