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:
2 files changed
+12
-6
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user