Commit Graph

5 Commits

Author SHA1 Message Date
hanishkvc 63430dc9f7 SimpleChatTC: Extract streamed field - assume only 1f at any time
Update response_extract_stream to check for which field is being
currently streamed ie is it normal content or tool call func name
or tool call func args and then return the field name and extracted
value.

Previously it was always assumed that only normal content will be
returned.

Currently it is assumed that the server will only stream one of the
3 supported fields at any time and not more than one of them at the
same time.

TODO: Have to also add logic to extract the reasoning field later,
ie wrt gen ai models which give out their thinking.

Have updated append_response to expect both the key and the value
wrt the latestResponse object, which it will be manipualted.

Previously it was always assumed that content is what will be got
and inturn appended.
2025-12-04 19:41:38 +05:30
hanishkvc bfe7ef69fa SimpleChatTC: Skeleton to handle diff fields when streaming
Changed latestResponse type to an object instead of a string.
Inturn it contains entries for content, toolname and toolargs.

Added a custom clear logic due to the same and used it to replace
the previously simple assigning of empty string to latestResponse.

For now in all places where latestReponse is used, I have replaced
with latestReponse.content.

Next need to handle identifying the field being streamed and inturn
append to it. Also need to add logic to call tool, when tool_call
triggered by genai.
2025-12-04 19:41:38 +05:30
hanishkvc 6167cdff9f SimpleChatTC: Bring in the tools meta into the main flow 2025-12-04 19:41:38 +05:30
hanishkvc 9341c507f2 SimpleChatTools: Add boolean to allow user control of tools use 2025-12-04 19:41:38 +05:30
Diego Devesa 1d36b3670b
llama : move end-user examples to tools directory (#13249)
* llama : move end-user examples to tools directory

---------

Co-authored-by: Xuan Son Nguyen <son@huggingface.co>
2025-05-02 20:27:13 +02:00
Renamed from examples/server/public_simplechat/simplechat.js (Browse further)