feature request for handling callbacks
See original GitHub issueI think callback functions are also needed to use semantic-kernel better. same concept here(link)
This feature will help solving TODOs. example is here
semantic-kernel/python/semantic_kernel/ai/open_ai/services/open_ai_chat_completion.py
async def complete_chat_async(
self, messages: List[Tuple[str, str]], request_settings: ChatRequestSettings
) -> str:
...
# TODO: tracking on token counts/etc.
return response.choices[0].message.content
At least i hope SKContext
or ContextVariables
has callback functions like on_update
or on_setitem
If MS doesn’t have a plan for this feature or it takes time, I can try.
Issue Analytics
- State:
- Created 5 months ago
- Reactions:1
- Comments:17 (16 by maintainers)
Top Results From Across the Web
Best Practices for Managing Callbacks in Contact Centers
The callback option is a Computer Telephony Integration (CTI) feature that allows clients to request a callback if the line is busy, ...
Read more >feature request for handling callbacks · microsoft/semantic- ...
Integrate cutting-edge LLM technology quickly and easily into your apps - feature request for handling callbacks · microsoft/semantic-kernel@8357616.
Read more >Enabling customer callback
Callback enables your customers to choose between waiting on hold in a queue or requesting a callback. When customers select callback, their places...
Read more >Managing callbacks - Genesys Documentation
This feature requires the Callback Administrator or Callback Supervisor role. Click Create Callback to submit or schedule a callback request. A new dialog...
Read more >Working with callback requests using the Customer Service ...
As a customer, you can request a callback from a customer service agent using the Customer Service Portal. You can request an immediate ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @alexchaomander, any comments on the proposal and PR? Having no way to track what’s going and “debug” is a big stopper for me.
This is a possible structure for a handler, with hooks in the order they will be called:
Some additional hooks should be added for the planner. The
pipeline
has almost no information, perhaps the call torun_async
could have an optionallegend
parameter just to identify a specific pipeline, and pass it as an argument to the handler, to be able to have a clearer trace. TheSKFunctions
already have their identification in the definition.The handlers could be set at the
kernel
level, and be used as defaults, or at the call level, to override for a specific invocation. All handlers will be invoked in order.If you agree, I could send a PR with an implementation of this approach.
Perhaps later, some general
on_error
,on_warning
,on_info
could also be added and use the handler in place of thelog
parameter, so that more consistent control of messages is possible. A defaultlogger_handler
could be available to just write in the provided logger, and so not break the current behavior