Respect ChatOptions.Instructions in HuggingFaceClient.GetResponseAsync#89
Respect ChatOptions.Instructions in HuggingFaceClient.GetResponseAsync#89HavenDV merged 2 commits intotryAGI:mainfrom
Conversation
WalkthroughAdds a conditional System-role message containing Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/libs/HuggingFace/Extensions/HuggingFaceApi.ChatClient.cs(1 hunks)
🔇 Additional comments (1)
src/libs/HuggingFace/Extensions/HuggingFaceApi.ChatClient.cs (1)
38-42: Place System instructions before conversation messages (recommended)ChatOptions.Instructions is provider-dependent; if you want it treated as a top-level System message, move the current block (src/libs/HuggingFace/Extensions/HuggingFaceApi.ChatClient.cs — lines 38–42) to immediately after
StringBuilder prompt = new();or add an explicit ChatMessage with roleSystemto guarantee ordering.
6d6447f to
a3cdf9c
Compare
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.