-
Notifications
You must be signed in to change notification settings - Fork 60.6k
add claude35haiku & not support vision #5779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -329,10 +329,11 @@ const anthropicModels = [ | |
| "claude-3-opus-20240229", | ||
| "claude-3-opus-latest", | ||
| "claude-3-haiku-20240307", | ||
| "claude-3-5-haiku-20241022", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 排序,把claude-3-5-haiku-latest和claude-3-5-haiku-20241022放一起
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 已改 |
||
| "claude-3-5-haiku-latest", | ||
| "claude-3-5-sonnet-20240620", | ||
| "claude-3-5-sonnet-20241022", | ||
| "claude-3-5-sonnet-latest", | ||
| "claude-3-5-haiku-latest", | ||
| ]; | ||
|
|
||
| const baiduModels = [ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -254,6 +254,7 @@ export function getMessageImages(message: RequestMessage): string[] { | |
| export function isVisionModel(model: string) { | ||
| // Note: This is a better way using the TypeScript feature instead of `&&` or `||` (ts v5.5.0-dev.20240314 I've been using) | ||
|
|
||
| const excludeKeywords = ["claude-3-5-haiku-20241022"]; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里应该先判断属于排除列表直接返回 现在放后面通过
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这里&&短路了 没问题
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 意思是excludeKeywords判断直接return 可以避免后面的运算 |
||
| const visionKeywords = [ | ||
| "vision", | ||
| "claude-3", | ||
|
|
@@ -266,9 +267,10 @@ export function isVisionModel(model: string) { | |
| model.includes("gpt-4-turbo") && !model.includes("preview"); | ||
|
|
||
| return ( | ||
| visionKeywords.some((keyword) => model.includes(keyword)) || | ||
| isGpt4Turbo || | ||
| isDalle3(model) | ||
| !excludeKeywords.some((keyword) => model.includes(keyword)) && | ||
| (visionKeywords.some((keyword) => model.includes(keyword)) || | ||
| isGpt4Turbo || | ||
| isDalle3(model)) | ||
| ); | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.