-
Notifications
You must be signed in to change notification settings - Fork 31
Developer update auto gen and sk #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n-calling in Chat progress and support for Vision model at the saome time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the Senparc AI Kernel to support a new combined Chat + Vision model and updates how kernels are built and configured in both production and sample code.
- Adds two new RunChatVisionAsync overloads in KernelConfigExtensions.cs to support combined chat-vision processing.
- Updates SemanticAiHandler.cs to use RunChatVisionAsync and introduces a kernelBuilderAction parameter.
- Adjusts sample plugins and chat sample integration for the new functionality.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/Senparc.AI.Kernel/KernelConfigExtensions/KernelConfigExtensions.cs | Introduces Chat region with new RunChatVisionAsync methods and modifies content item processing. |
src/Senparc.AI.Kernel/Handlers/SemanticAiHandler.cs | Updates ChatConfig and ChatAsync to integrate the new RunChatVisionAsync and adds kernelBuilderAction. |
Samples/Senparc.AI.Samples.Consoles/Samples/Plugins/Objects/SearchPlugin.cs | Updates method description to reflect correct functionality. |
Samples/Senparc.AI.Samples.Consoles/Samples/Plugins/Objects/NowPlugin.cs | New plugin added for returning the current time. |
Samples/Senparc.AI.Samples.Consoles/Samples/ChatSample.cs | Incorporates kernelBuilderAction for plugin registration and adjusts conversation round handling. |
Files not reviewed (1)
- src/Senparc.AI.Kernel/Senparc.AI.Kernel.csproj: Language not supported
Comments suppressed due to low confidence (1)
src/Senparc.AI.Kernel/KernelConfigExtensions/KernelConfigExtensions.cs:744
- The variable name 'ciBae64' appears to be a typo; consider renaming it to 'ciBase64' for clarity.
else if (contentItem is ContentItem_ImageBse64 ciBae64)
/// <param name="inStreamItemProceessing">启用流,并指定遍历异步流每一步需要执行的委托。注意:只要此项不为 null,则会触发流式的请求。</param> | ||
/// <returns></returns> | ||
public static Task<SenparcKernelAiResult<string>> RunChatVisionAsync(this IWantToRun iWanToRun, | ||
SenparcAiRequest request, ChatHistory chatHistory, List<IContentItem> contentList, | ||
PromptConfigParameter? parameter = null, | ||
Action<StreamingKernelContent> inStreamItemProceessing = null) | ||
{ | ||
return RunChatVisionAsync<string>(iWanToRun, request, chatHistory, contentList, parameter, inStreamItemProceessing); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter 'inStreamItemProceessing' seems misspelled; consider renaming it to 'inStreamItemProcessing' for accuracy and consistency.
/// <param name="inStreamItemProceessing">启用流,并指定遍历异步流每一步需要执行的委托。注意:只要此项不为 null,则会触发流式的请求。</param> | |
/// <returns></returns> | |
public static Task<SenparcKernelAiResult<string>> RunChatVisionAsync(this IWantToRun iWanToRun, | |
SenparcAiRequest request, ChatHistory chatHistory, List<IContentItem> contentList, | |
PromptConfigParameter? parameter = null, | |
Action<StreamingKernelContent> inStreamItemProceessing = null) | |
{ | |
return RunChatVisionAsync<string>(iWanToRun, request, chatHistory, contentList, parameter, inStreamItemProceessing); | |
/// <param name="inStreamItemProcessing">启用流,并指定遍历异步流每一步需要执行的委托。注意:只要此项不为 null,则会触发流式的请求。</param> | |
/// <returns></returns> | |
public static Task<SenparcKernelAiResult<string>> RunChatVisionAsync(this IWantToRun iWanToRun, | |
SenparcAiRequest request, ChatHistory chatHistory, List<IContentItem> contentList, | |
PromptConfigParameter? parameter = null, | |
Action<StreamingKernelContent> inStreamItemProcessing = null) | |
{ | |
return RunChatVisionAsync<string>(iWanToRun, request, chatHistory, contentList, parameter, inStreamItemProcessing); |
Copilot uses AI. Check for mistakes.
No description provided.