-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add anthropic claude-3.5-sonnet-20241022
- Loading branch information
1 parent
243dae4
commit a9d7a7e
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
45 changes: 45 additions & 0 deletions
45
core/providers/anthropic/src/models/chat-models/claude-3-5-sonnet-20241022.anthropic.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { z } from "zod"; | ||
|
||
import { ChatModelSchema } from "@adaline/provider"; | ||
|
||
import { AnthropicChatModelConfigs } from "../../configs"; | ||
import { BaseChatModel, BaseChatModelOptions } from "./base-chat-model.anthropic"; | ||
import { | ||
AnthropicChatModelModalities, | ||
AnthropicChatModelModalitiesEnum, | ||
AnthropicChatModelRoles, | ||
AnthropicChatModelRolesMap, | ||
} from "./types"; | ||
|
||
const Claude3_5Sonnet20241022Literal = "claude-3-5-sonnet-20241022"; | ||
const Claude3_5Sonnet20241022Description = "Most intelligent model. Highest level of intelligence and capability."; | ||
|
||
const Claude3_5Sonnet20241022Schema = ChatModelSchema(AnthropicChatModelRoles, AnthropicChatModelModalitiesEnum).parse({ | ||
name: Claude3_5Sonnet20241022Literal, | ||
description: Claude3_5Sonnet20241022Description, | ||
maxInputTokens: 200000, | ||
maxOutputTokens: 8192, | ||
roles: AnthropicChatModelRolesMap, | ||
modalities: AnthropicChatModelModalities, | ||
config: { | ||
def: AnthropicChatModelConfigs.base(8192, 4).def, | ||
schema: AnthropicChatModelConfigs.base(8192, 4).schema, | ||
}, | ||
}); | ||
|
||
const Claude3_5Sonnet20241022Options = BaseChatModelOptions; | ||
type Claude3_5Sonnet20241022OptionsType = z.infer<typeof Claude3_5Sonnet20241022Options>; | ||
|
||
class Claude3_5Sonnet20241022 extends BaseChatModel { | ||
constructor(options: Claude3_5Sonnet20241022OptionsType) { | ||
super(Claude3_5Sonnet20241022Schema, options); | ||
} | ||
} | ||
|
||
export { | ||
Claude3_5Sonnet20241022, | ||
Claude3_5Sonnet20241022Options, | ||
Claude3_5Sonnet20241022Schema, | ||
Claude3_5Sonnet20241022Literal, | ||
type Claude3_5Sonnet20241022OptionsType, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters