SimpleChatTC: Update readme wrt web fetch and related simple proxy
This commit is contained in:
parent
8b950fd348
commit
cd226e8dae
|
|
@ -334,16 +334,21 @@ The following tools/functions are currently provided by default
|
|||
* simple_calculator - which can solve simple arithmatic expressions
|
||||
* run_javascript_function_code - which can be used to run some javascript code in the browser
|
||||
context.
|
||||
* web_url_fetch - fetch requested url through a proxy server
|
||||
* web_url_fetch_strip_htmltags_and_some_useless - fetch requested url through a proxy server
|
||||
and also try strip the html respose of html tags and also head, script & style blocks.
|
||||
|
||||
Currently the generated code / expression is run through a simple minded eval inside a web worker
|
||||
mechanism. Use of WebWorker helps avoid exposing browser global scope to the generated code directly.
|
||||
However any shared web worker scope isnt isolated. Either way always remember to cross check the tool
|
||||
requests and generated responses when using tool calling.
|
||||
|
||||
May add
|
||||
* web_fetch along with a corresponding simple local web proxy/caching server logic that can bypass
|
||||
the CORS restrictions applied if trying to directly fetch from the browser js runtime environment.
|
||||
Inturn maybe with a white list of allowed sites to access or so.
|
||||
web_url_fetch and family works along with a corresponding simple local web proxy/caching server logic
|
||||
that can bypass the CORS restrictions applied if trying to directly fetch from the browser js runtime
|
||||
environment. Depending on the path specified on the proxy server, if urltext, it additionally tries
|
||||
to convert html content into equivalent text to some extent. May add support for white list of allowed
|
||||
sites to access or so.
|
||||
* tools/server/public_simplechat/local.tools/simpleproxy.py
|
||||
|
||||
|
||||
#### Extending with new tools
|
||||
|
|
@ -394,8 +399,6 @@ get incorporated in result sent to ai engine on the server side.
|
|||
|
||||
#### ToDo
|
||||
|
||||
WebFetch and Local web proxy/caching server
|
||||
|
||||
Is the promise land trap deep enough, need to think through and explore around this once later.
|
||||
|
||||
Trap error responses.
|
||||
|
|
|
|||
Loading…
Reference in New Issue