Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
fa23e9d
SimpleChatToolCalling: Test/Explore srvr initial hs using cmdline
hanishkvc Oct 10, 2025
75ce9e4
SimpleChatTools: Add boolean to allow user control of tools use
hanishkvc Oct 10, 2025
68fc28f
SimpleChatTC: Update test shell script a bit
hanishkvc Oct 10, 2025
85845a0
SimpleChatTC: Add skeleton for a javascript interpretor tool call
hanishkvc Oct 10, 2025
bbaae70
SimpleChatTC: More generic tooljs, SimpCalc, some main skeleton
hanishkvc Oct 10, 2025
f091568
SimpleChatTC: Bring in the tools meta into the main flow
hanishkvc Oct 10, 2025
9d8be85
SimpleChatTC: use tcpdump to dbg hs; check if ai aware of tools
hanishkvc Oct 10, 2025
2e4693c
SimpleChatTC: Skeleton to handle diff fields when streaming
hanishkvc Oct 10, 2025
27161cb
SimpleChatTC: Extract streamed field - assume only 1f at any time
hanishkvc Oct 10, 2025
788d56a
SimpleChatTC: Avoid null content, Fix oversight wrt finish_reason
hanishkvc Oct 10, 2025
4cbe1d2
SimpleChatTC: Show toolcall being generated by ai - Temp
hanishkvc Oct 10, 2025
174b0b1
SimpleChatTC: AssistantResponse class initial go
hanishkvc Oct 10, 2025
10b1013
SimpleChatTC: AssistantResponse everywhere initial go
hanishkvc Oct 10, 2025
e4e29a2
SimpleChatTC: twins wrt streamed response handling
hanishkvc Oct 10, 2025
d7f612f
SimpleChatTC: Saner/Robust AssistantResponse content_equiv
hanishkvc Oct 10, 2025
2a27697
SimpleChatTC:tooljs: Trap console.log and store in new result key
hanishkvc Oct 11, 2025
92b82ae
SimpleChatTC: Implement a simple toolcall handling flow
hanishkvc Oct 11, 2025
d8b1b36
SimpleChatTC: Cleanup initial/1st go toolcall flow
hanishkvc Oct 11, 2025
7a2bcfb
SimpleChatTC: Trap any exception raised during tool call
hanishkvc Oct 11, 2025
f10ab96
SimpleChatTC: More clearer description of toolcalls execution env
hanishkvc Oct 12, 2025
a1f1776
SimpleChatTC: Clarify some type definitions to avoid warnings
hanishkvc Oct 12, 2025
4ac6f0a
SimpleChatTC: Move tool calling to tools, try trap async failures
hanishkvc Oct 12, 2025
3796306
SimpleChatTC: Pass toolname to the tool handler
hanishkvc Oct 12, 2025
0ed8329
SimpleChatTC: Cleanup the function description a bit
hanishkvc Oct 12, 2025
aa81f51
SimpleChatTC: Update the readme.md wrt tool calling a bit
hanishkvc Oct 12, 2025
5ed2bc3
SimpleChatTC: ToolCall hs info in normal assistant-user chat flow
hanishkvc Oct 12, 2025
619d64d
SimpleChatTC: Add ui elements for tool call verify and trigger
hanishkvc Oct 12, 2025
226aa7d
SimpleChatTC: Let user trigger tool call, instead of automatic
hanishkvc Oct 12, 2025
2aabca2
SimpleChatTC: Update readme with bit more details, Cleaner UI
hanishkvc Oct 12, 2025
90b2491
SimpleChatTC: Tool Calling UI elements use up horizontal space
hanishkvc Oct 12, 2025
a8eadc4
SimpleChatTC: Update readme wrt --jinja argument and bit more
hanishkvc Oct 12, 2025
70bc1b4
SimpleChatTC: Move console.log trapping into its own module
hanishkvc Oct 13, 2025
f8ebe8f
SimpleChatTC:ToolsConsole:Cleanup a bit, add basic set of notes
hanishkvc Oct 13, 2025
cc60600
SimpleChatTC: Initial skeleton of a simple toolsworker
hanishkvc Oct 13, 2025
7ea9bf6
SimpleChatTC: Pass around structured objects wrt tool worker
hanishkvc Oct 13, 2025
4664748
SimpleChatTC: Actual tool call implementations simplified
hanishkvc Oct 13, 2025
5933b28
SimpleChatTC: Get ready for decoupled tool call response
hanishkvc Oct 13, 2025
50be171
SimpleChatTC: Web worker flow initial go cleanup
hanishkvc Oct 13, 2025
44cfebc
SimpleChatTC: Increase the sliding window context to Last4 QA
hanishkvc Oct 13, 2025
6f137f2
SimpleChatTC: Update readme.md wrt latest updates. 2k maxtokens
hanishkvc Oct 13, 2025
dbf050c
SimpleChatTC: update descs to indicate use of web workers
hanishkvc Oct 13, 2025
39c1c01
SimpleChatTC:ChatMessage: AssistantResponse into chat message class
hanishkvc Oct 14, 2025
e9a7871
SimpleChatTC:ChatMessageEx: UpdateStream logic
hanishkvc Oct 14, 2025
340ae0c
SimpleChatTC:ChatMessageEx:cleanup, HasToolCalls, ContentEquiv
hanishkvc Oct 14, 2025
0629f79
SimpleChatTC:ChatMessage: remove ResponseExtractStream
hanishkvc Oct 14, 2025
bb25aa0
SimpleChatTC:ChatMessageEx: add update_oneshot
hanishkvc Oct 14, 2025
ae00cb2
SimpleChatTC:ChatMessageEx: ods load, system prompt related
hanishkvc Oct 14, 2025
e1e1d42
SimpleChatTC:ChatMessageEx: RecentChat, GetSystemLatest
hanishkvc Oct 14, 2025
3b73b00
SimpleChatTC:ChatMessageEx: Upd Add, rm sysPromptAtBeginOnly hlpr
hanishkvc Oct 14, 2025
aa80bf0
SimpleChatTC:ChatMessageEx: Recent chat users upd
hanishkvc Oct 14, 2025
755505e
SimpleChatTC:ChatMessageEx: Cleanup remaining stuff
hanishkvc Oct 14, 2025
7fb5526
SimpleChatTC:Load allows old and new ChatMessage(Ex) formats
hanishkvc Oct 14, 2025
69cbc81
SimpleChatTC:ChatMessageEx: send tool_calls, only if needed
hanishkvc Oct 14, 2025
f379e65
SimpleChatTC:Propogate toolcall id through tool call chain
hanishkvc Oct 14, 2025
4efa232
SimpleChatTC:ChatMessageEx: Build tool role result fully
hanishkvc Oct 14, 2025
a644cb3
SimpleChatTC:ChatMessageEx:While at it also ns_delete
hanishkvc Oct 14, 2025
61c2314
SimpleChatTC:Readme: Updated wrt new relativelyProper toolCallsHS
hanishkvc Oct 14, 2025
75a63e3
SimpleChatTC:ChatMessageEx: Better tool result extractor
hanishkvc Oct 15, 2025
99b04ec
SimpleChatTC:ChatMessageEx: 1st go at trying to track promises
hanishkvc Oct 15, 2025
7dc999f
SimpleChatTC:TrapPromise: log the trapping
hanishkvc Oct 15, 2025
5d76493
SimpleChatTC:Promises: trap normal fetch (dont care await or not)
hanishkvc Oct 15, 2025
788a9e4
SimpleChatTC: Allow await in generated code that will be evald
hanishkvc Oct 15, 2025
c155bd3
SimpleChatTC:Ensure fetch's promise chain is also trapped
hanishkvc Oct 15, 2025
1e1bb9a
SimpleChatTC: update readme wrt promise related trapping
hanishkvc Oct 15, 2025
9b1ed1f
SimpleChatTC:WebFetchThroughProxy:Initial go creating request
hanishkvc Oct 16, 2025
1b361ee
SimpleChatTC:SimpleProxy:Process args --port
hanishkvc Oct 16, 2025
9ec3d45
SimpleChatTC:SimpleProxy: Start server, Show requested path
hanishkvc Oct 16, 2025
620da45
SimpleChatTC:SimpleProxy: Cleanup for basic run
hanishkvc Oct 16, 2025
bdd054b
SimpleChatTC:SimpleProxy: Extract and check path, route to handlers
hanishkvc Oct 16, 2025
5ac60a8
SimpleChatTC:SimpleProxy:implement handle_urlraw
hanishkvc Oct 16, 2025
ac448c3
SimpleChatTC:SimpleProxy:UrlRaw: Fixup basic oversight wrt 1st go
hanishkvc Oct 16, 2025
2ca2b98
SimpleChatTC:WebFetch: Update to use internal SimpleProxy.py
hanishkvc Oct 16, 2025
04a5f95
SimpleChatTC:SimpleProxy: Cleanup few messages
hanishkvc Oct 16, 2025
295893c
SimpleChatTC:SimpleProxy:Common UrlReq helper for UrlRaw & UrlText
hanishkvc Oct 16, 2025
4694537
SimpleChatTC:SimpleProxy: ElementTree, No _UrlopenRet
hanishkvc Oct 16, 2025
696d560
SimpleChatTC:SimpleProxy: Switch to html.parser
hanishkvc Oct 16, 2025
2e6a386
SimpleChatTC:SimpleProxy:UrlText: Capture body except for scripts
hanishkvc Oct 16, 2025
0a3b4c2
SimpleChatTC:SimpleProxy:UrlText: Avoid style blocks also
hanishkvc Oct 16, 2025
61b9371
SimpleChatTC:WebUrl FetchStrip through simple proxy
hanishkvc Oct 16, 2025
378bde5
SimpleChatTC:SimpleProxy:UrlText: Try strip empty lines some what
hanishkvc Oct 16, 2025
e7277cb
SimpleChatTC:SimpleProxy:UrlText: Slightly better trimming
hanishkvc Oct 16, 2025
9db2f27
SimpleChatTC:WebUrlText:Update name and desc to see if prefered
hanishkvc Oct 16, 2025
c5a602f
SimpleChatTC:SimpleProxy:Options just in case
hanishkvc Oct 16, 2025
6efbd12
SimpleChatTC:WebFetch:UrlEnc url2fetch b4Passing toProxy asQuery
hanishkvc Oct 16, 2025
8f0700a
SimpleChatTC: Update readme wrt web fetch and related simple proxy
hanishkvc Oct 17, 2025
514cec0
SimpleChatTC:SimpleProxy:HtmlParser more generic and flexible
hanishkvc Oct 17, 2025
e124317
SimpleChatTC:WebFetch: Cleanup the names and descriptions a bit
hanishkvc Oct 17, 2025
910995e
SimpleChatTC:SimpleProxy: Ensure CORS related headers sent always
hanishkvc Oct 17, 2025
4ffed94
SimpleChatTC:WebFetch:Trap Non Ok status and raise error
hanishkvc Oct 17, 2025
a2a89a0
SimpleChatTC:WebFetch: Update readme to reflect the new names
hanishkvc Oct 17, 2025
7dc5929
SimpleChatTC:Tools: Pick proxy server address from document[gMe]
hanishkvc Oct 18, 2025
aa1c43d
SimpleChatTC:UI: el_get/el_set to avoid warnings
hanishkvc Oct 19, 2025
8a68ccb
SimpleChatTC:UI:Common helper to edit obj members of few types
hanishkvc Oct 20, 2025
60b2bfd
SimpleChatTC:UI:ObjPropEdits handle objects, use for gMe
hanishkvc Oct 20, 2025
9b48618
SimpleChatTC:Use generic obj props edit for settings in general
hanishkvc Oct 20, 2025
e897276
SimpleChatTC:Trappable UiShowObjPropsEdit for custom handling
hanishkvc Oct 20, 2025
97af8f6
SimpleChatTC:UiShowObjPropsEdit allow refining
hanishkvc Oct 20, 2025
a3e424d
SimpleChatTC:ObjPropsEdit: Obj within Obj aware fRefiner
hanishkvc Oct 20, 2025
94982cf
SimpleChatTC:NonStreaming: Update oneshot mode wrt tool calls
hanishkvc Oct 20, 2025
8be6d8e
SimpleChatTC: Update/Cleanup readme
hanishkvc Oct 20, 2025
7888a88
SimpleChatTC:WebFetch: Enable only if something at proxyUrl
hanishkvc Oct 20, 2025
d667e2d
SimpleChatTC:WebFetch: Check for the specific proxy paths
hanishkvc Oct 20, 2025
f8e8087
SimpleChatTC:WebFetch: Try confirm simpleproxy before enabling
hanishkvc Oct 20, 2025
38fd796
SimpleChatTC:Fetch:Proxy URL rename and in settings
hanishkvc Oct 20, 2025
4e73683
SimpleChatTC:ShowInfo: Create and use common automated info show
hanishkvc Oct 20, 2025
7f3ac59
SimpleChatTC:ShowInfo: Make logic recursive, avoid JSON.stringify
hanishkvc Oct 20, 2025
e00f0af
SimpleChatTC:ShowObjPropsInfo: Use sections to indicate relations
hanishkvc Oct 21, 2025
ba0f0e3
SimpleChatTC:ShowInfo: Allow showing minimal info set, if needed
hanishkvc Oct 21, 2025
bd3e9bd
SimpleChatTC:ShowInfo:Clean up layout of showing of props data
hanishkvc Oct 21, 2025
f3a1fc7
SimpleChatTC:Cleanup: Move bTools and toolFetchProxyUrl into tools
hanishkvc Oct 21, 2025
fb36d1e
SimpleChatTC:Cleanup:EditObjProps: rename vars followingConvention
hanishkvc Oct 21, 2025
d34dfc1
SimpleChatTC:Cleanup:Rename func arg to match semantic better
hanishkvc Oct 21, 2025
dcbe837
SimpleChatTC:ShowObjPropsEdit:Any depth trapping of ui setup
hanishkvc Oct 21, 2025
064c423
SimpleChatTC:ShowObjPropsEdit:Any depth trapping of ui setup - t2
hanishkvc Oct 21, 2025
99ae476
SimpleChatTC:Cleanup:ChatProps: Move bStream into it
hanishkvc Oct 21, 2025
fc4d708
SimpleChatTC:Cleanup:ChatProps: iRecentUserMsgCnt
hanishkvc Oct 21, 2025
a9153f4
SimpleChatTC:Cleanup:ChatProps: bCompletionFreshChatAlways
hanishkvc Oct 21, 2025
ee2ef6d
SimpleChatTC:Cleanup:ChatProps: bCompletionInsertStandardRolePrefix
hanishkvc Oct 21, 2025
e3bc0dc
SimpleChatTC:Cleanup:ChatProps: bTrimGarbage
hanishkvc Oct 21, 2025
1793872
SimpleChatTC:Cleanup:ChatProps: apiEP
hanishkvc Oct 22, 2025
250bf08
SimpleChatTC:Tools: Show available tool names
hanishkvc Oct 22, 2025
832d613
SimpleChatTC:SimpleProxy:Allow for loading json based config file
hanishkvc Oct 23, 2025
a415180
SimpleChatTC:SimpleProxy: Update doc following python convention
hanishkvc Oct 23, 2025
289e9e0
SimpleChatTC:SimpleProxy: AllowedDomains based filtering
hanishkvc Oct 23, 2025
7f00709
SimpleChatTC:SimpleProxy: Cleanup domain filtering and general
hanishkvc Oct 23, 2025
05b52c3
SimpleChatTC:SimpleProxy: Include a sample config file
hanishkvc Oct 23, 2025
da99c8b
SimpleChatTC: Update readme a bit
hanishkvc Oct 23, 2025
e42e72e
SimpleChatTC:SimpleProxy: Some debug prints which give info
hanishkvc Oct 23, 2025
0cb2217
SimpleChatTC:SimpleProxy:Try mimic real client using got req info
hanishkvc Oct 23, 2025
25b7aab
SimpleChatTC:SimpleProxy:Cleanup a bit
hanishkvc Oct 23, 2025
9bd3b35
SimpleChatTC:SimpleProxy: mimicing got req helps wrt duckduckgo
hanishkvc Oct 23, 2025
9441798
SimpleChatTC:ToolCall response relaxed handling
hanishkvc Oct 23, 2025
200181f
SimpleChatTC:SimpleProxy: Update readme wrt mimicing client req
hanishkvc Oct 23, 2025
33f35ca
SimpleChatTC:ToolResponse: Use browser dom for xml/html safe
hanishkvc Oct 23, 2025
fb982f0
SimpleChatTC:SimpleProxy: debug dumps to identify funny bing
hanishkvc Oct 23, 2025
8b18473
SimpleChatTC:SimpleProxy:Cleanup
hanishkvc Oct 23, 2025
a128f83
SimpleChatTC:Auto tool calling control to end user
hanishkvc Oct 23, 2025
524aa01
SimpleChatTC:AutoToolCalls: Track and clear related timers
hanishkvc Oct 24, 2025
a4152d1
SimpleChatTC: Cleanup whitespaces
hanishkvc Oct 24, 2025
cff1de9
SimpleChatTC:Cleanup whitespace - github editorconfig checker
hanishkvc Oct 24, 2025
8481ab4
SimpleChatTC:Update and cleanup the readme a bit
hanishkvc Oct 26, 2025
d0621d4
SimpleChatTC:Duplicate tooljs.mjs to toolweb.mjs
hanishkvc Oct 26, 2025
2ab014b
SimpleChatTC:ToolCalling:Seprat out JSWebWorker and ProxyBasedWeb
hanishkvc Oct 26, 2025
21ac08c
SimpleChatTC:ToolCall:SearchWebText using UrlText
hanishkvc Oct 26, 2025
303d1f3
SimpleChatTC:ToolCallWeby: Cleanup the toolweb module flow
hanishkvc Oct 26, 2025
251eecf
SimpleChatTC:WebSearchPlus: Update readme, Wikipedia in allowed
hanishkvc Oct 26, 2025
16834c1
SimpleChatTC:ToolCallResponseTimeout: Allow end user to control
hanishkvc Oct 26, 2025
3c03ec9
SimpleChatTC:SimpleProxy:LoadConfig ProcessArgs cleanup - initial
hanishkvc Oct 27, 2025
6ed43e0
SimpleChatTC:SimpleProxy: Prg Parameters handling cleanup - next
hanishkvc Oct 27, 2025
945dede
SimpleChatTC:SimpleProxy:BearerInsecure a needed config
hanishkvc Oct 27, 2025
0083efd
SimpleChatTC:SimpleProxy: Check for bearer authorization
hanishkvc Oct 27, 2025
926b27a
SimpleChatTC:tools.proxyUrl: rename to just proxyUrl
hanishkvc Oct 27, 2025
41a5fda
SimpleChatTC:SimpleProxy:ClientUI: Send Authorization bearer
hanishkvc Oct 27, 2025
4bc5d26
SimpleChatTC:SimpleProxy: once in a bluemoon transformed bearer
hanishkvc Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tools/server/public_simplechat/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@
<p> You need to have javascript enabled.</p>
</div>

<hr>
<div id="tool-div">
<div>
<div class="sameline">
<textarea id="toolname-in" class="flex-grow" rows="1" placeholder="name of tool to run"></textarea>
<button id="tool-btn">run tool</button>
</div>
</div>
<div class="sameline">
<textarea id="toolargs-in" class="flex-grow" rows="2" placeholder="arguments to pass to the specified tool"></textarea>
</div>
</div>

<hr>
<div class="sameline">
<textarea id="user-in" class="flex-grow" rows="2" placeholder="enter your query to the ai model here" ></textarea>
Expand Down
17 changes: 17 additions & 0 deletions tools/server/public_simplechat/local.tools/simpleproxy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"allowed.domains": [
".*\\.wikipedia\\.org$",
".*\\.bing\\.com$",
"^www\\.bing\\.com$",
".*\\.yahoo\\.com$",
"^search\\.yahoo\\.com$",
".*\\.brave\\.com$",
"^search\\.brave\\.com$",
"^brave\\.com$",
".*\\.duckduckgo\\.com$",
"^duckduckgo\\.com$",
".*\\.google\\.com$",
"^google\\.com$"
],
"bearer.insecure": "NeverSecure"
}
Loading
Loading