Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4714dd8
refactor: split UI logic in ChatHeader.razor
qoweh Sep 13, 2025
04735cc
test: add integration tests for NewChat button and icon visibility
qoweh Sep 13, 2025
a8f0a7d
Merge remote-tracking branch 'upstream/main'
qoweh Sep 13, 2025
6e68171
Merge remote-tracking branch 'origin/main'
qoweh Sep 18, 2025
1f5783c
Merge branch 'aliencube:main' into main
qoweh Sep 22, 2025
5094a9f
Merge branch 'aliencube:main' into main
qoweh Sep 23, 2025
8ed4bfd
Merge branch 'aliencube:main' into main
qoweh Sep 25, 2025
39354bc
Merge branch 'aliencube:main' into main
qoweh Sep 28, 2025
cf64868
Merge branch 'aliencube:main' into main
qoweh Oct 1, 2025
6cfef60
Merge branch 'aliencube:main' into main
qoweh Oct 5, 2025
aeb63e8
Merge branch 'aliencube:main' into main
qoweh Oct 8, 2025
1e225a0
Merge branch 'main' into feat/261-ConnectorImplementation-Inheritance…
qoweh Oct 13, 2025
bb8dcbf
feat: Add support for Anthropic API integration and update documentation
qoweh Oct 13, 2025
ebf7b2b
feat: Add documentation for running OpenChat Playground with Anthropi…
qoweh Oct 13, 2025
e06184b
feat: Update default model references to Claude Sonnet 4 and adjust a…
qoweh Oct 13, 2025
e3dba70
feat: Add support for Anthropic connector in LanguageModelConnector
qoweh Oct 13, 2025
15881b4
feat: Implement Anthropic connector for LanguageModel integration
qoweh Oct 14, 2025
0708685
feat: Enhance AnthropicConnector with improved error handling and add…
qoweh Oct 14, 2025
65b2d5f
Adds documentation for Anthropic connector
qoweh Oct 14, 2025
c625f11
Updates documentation to refer to Anthropic models
qoweh Oct 14, 2025
9bc001b
feat: Refactor GetChatClientAsync to improve API client initializatio…
qoweh Oct 14, 2025
4842bc8
Merge branch 'aliencube:main' into main
qoweh Oct 16, 2025
24c3dd5
Merge branch 'main' into feat/261-ConnectorImplementation-Inheritance…
qoweh Oct 16, 2025
d23c92b
feat: add max_tokens parameter for Anthropic in appsettings.json
qoweh Oct 16, 2025
92c3eed
feat: add property MaxTokens for Anthropic in AnthropicSettings
qoweh Oct 16, 2025
604dcf3
Merge remote-tracking branch 'origin/main' into feat/261-ConnectorImp…
qoweh Oct 16, 2025
1a58fb7
fix: temporarily disable Anthropic
qoweh Oct 16, 2025
9c51809
test: skip all Anthropic connector tests until enabled
qoweh Oct 16, 2025
06efab1
refactor: update documentation to remove "Claude" references from Ant…
qoweh Oct 18, 2025
99b7de9
Merge branch 'main' into feat/261-ConnectorImplementation-Inheritance…
qoweh Oct 18, 2025
09ad176
feat: add option MaxTokens for parsing option
qoweh Oct 20, 2025
cc490d7
Merge branch 'main' into feat/261-ConnectorImplementation-Inheritance…
qoweh Oct 20, 2025
8032506
feat: add constant for '--max-tokens' command-line argument
qoweh Oct 20, 2025
868ffff
feat: Enforce MaxTokens configuration in AnthropicConnector
qoweh Oct 27, 2025
bcf409d
refactor : Remove redundant comment
qoweh Oct 27, 2025
0b701b4
refactor: remove whitespace
qoweh Oct 27, 2025
3108729
refactor: revert unintended formatting change
qoweh Oct 27, 2025
e498d15
feat: Improves Anthropic connector validation
qoweh Oct 27, 2025
940951b
Merge branch 'main' into feat/261-ConnectorImplementation-Inheritance…
qoweh Oct 27, 2025
4cbff1f
feat: Update Anthropic tests for max tokens config
qoweh Oct 28, 2025
b677b09
Revert "feat: Update Anthropic tests for max tokens config"
qoweh Oct 28, 2025
b3d7a44
Add AnthropicConnector (#2)
sikutisa Oct 29, 2025
d333660
remove white space
sikutisa Oct 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/OpenChat.PlaygroundApp/Connectors/AnthropicConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,25 @@ public override bool EnsureLanguageModelSettingsValid()
public override async Task<IChatClient> GetChatClientAsync()
{
var settings = this.Settings as AnthropicSettings;

var apiKey = settings?.ApiKey;

if (string.IsNullOrWhiteSpace(apiKey) == true)
{
throw new InvalidOperationException("Missing configuration: Anthropic:ApiKey.");
}

var client = new AnthropicClient(apiKey);
var chatClient = client.Messages;
var client = new AnthropicClient() { Auth = new APIAuthentication(apiKey) };

var chatClient = client.Messages
.AsBuilder()
.UseFunctionInvocation()
.Use((messages, options, next, cancellationToken) =>
{
options!.ModelId = settings!.Model;
options.MaxOutputTokens ??= 1000;
return next(messages, options, cancellationToken);
})
.Build();

Console.WriteLine($"The {this._appSettings.ConnectorType} connector created with model: {settings!.Model}");

Expand Down
Loading