-
-
Notifications
You must be signed in to change notification settings - Fork 594
add claude streaming #1253
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
add claude streaming #1253
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||||||||
PR Type
Enhancement
Description
Implement Claude streaming support with async chat completions
Add PDF reading capability detection via model settings
Refactor Anthropic provider with improved tool handling and thinking parameters
Enhance image converter logic with null safety checks
Diagram Walkthrough
File Walkthrough
LlmModelSetting.cs
Add PDF reading capability propertysrc/Infrastructure/BotSharp.Abstraction/MLTasks/Settings/LlmModelSetting.cs
AllowPdfReadingproperty that checks if model supports PDFreading capability
CapabilitiescontainsLlmModelCapability.PdfReadingFileInstructService.Pdf.cs
Refactor PDF reading with model capability detectionsrc/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.Pdf.cs
ILlmProviderServiceto check PDF readingcapability
AllowPdfReadingStopReason.cs
Add Claude stop reason constantssrc/Plugins/BotSharp.Plugin.AnthropicAI/Constants/StopReason.cs
EndTurn,MaxTokens,ToolUse,StopSequence,ContentFilter, andGuardRailChatCompletionProvider.cs
Implement Claude streaming and enhance chat completionsrc/Plugins/BotSharp.Plugin.AnthropicAI/Providers/ChatCompletionProvider.cs
GetChatCompletionsAsyncmethod with streaming callbacksupport
GetChatCompletionsStreamingAsyncmethod with real-time textstreaming and message hub integration
IConversationStateServicedependency for state managementresponse.ToolCallsinstead of parsingcontent blocks
GetThinkingParamsmethodProviderHelper.GetAnthropicClientmessages
PrepareOptionsmethodProviderHelper.cs
Add Anthropic client factory helpersrc/Plugins/BotSharp.Plugin.AnthropicAI/Providers/ProviderHelper.cs
client
authentication
Using.cs
Reorganize and expand global using statementssrc/Plugins/BotSharp.Plugin.AnthropicAI/Using.cs
BotSharp.Core.Infrastructures.StreamsandBotSharp.Core.MessageHubFileInstructService.cs
Improve image converter null safetysrc/Infrastructure/BotSharp.Core/Files/Services/Instruct/FileInstructService.cs
GetImageConvertermethod
default
BotSharp.Plugin.AnthropicAI.csproj
Update project dependency to Coresrc/Plugins/BotSharp.Plugin.AnthropicAI/BotSharp.Plugin.AnthropicAI.csproj
BotSharp.AbstractiontoBotSharp.Core