Updates Anthropic API to use structured content

Adapts the Anthropic client to use the new structured content format
for messages and system prompts, ensuring compatibility with the API's
expected input structure. This change modifies both the standard
request and the test request within the Anthropic client.
This commit is contained in:
AlexKucera committed 2025-09-26 08:52:24 +02:00
1 parent fe51d1efd2
commit 565cddf86c
2 files changed
+12 -6

No files matched your search

+8 -2
View File
@@ -12,14 +12,20 @@ export interface FreewritingCleanupSettings {
export interface AnthropicMessage {
role: 'user' | 'assistant' | 'system';
content: string;
content: Array<{
type: string;
text: string;
}>;
}
export interface AnthropicRequest {
model: string;
max_tokens: number;
messages: AnthropicMessage[];
system?: string;
system?: Array<{
type: string;
text: string;
}>;
}
export interface AnthropicResponse {