-
Notifications
You must be signed in to change notification settings - Fork 45
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
Avatar for Meta-Llama-3.1-405B-Instruct model fixed #712
Conversation
src/lib/ChatCraftModel.ts
Outdated
@@ -43,7 +43,7 @@ export class ChatCraftModel { | |||
return "/google-gemini-logo.png"; | |||
} | |||
|
|||
if (this.name.includes("llama")) { | |||
if (this.name.toLowerCase().includes("llama")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good fix, but let's do it everywhere in the function. At the top of logoUrl()
can you do:
const vendor = this.vendor.toLowerCase();
const modelName = this.name.toLowerCase();
Then change all the uses of this.name
to use modelName
src/lib/ChatCraftModel.ts
Outdated
return "/microsoft-phi-logo.png"; // Microsoft's Phi model logo | ||
} | ||
|
||
if (vendor === "google") { | ||
return "/google-gemini-logo.png"; | ||
} | ||
|
||
if (this.name.includes("llama")) { | ||
if (modelName.toLowerCase().includes("llama")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modelName is already lowercase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am so sorry for making you check the code many times ...
All model names are checked in in a case-insensitive manner for Avatar
Make sure you do these changes on topic branches, not your |
Description
This Fixes #704
The
logoUrl()
function in theChatCraftModel
class checks the model’s name to determine the correct logo URL. However, some Llama model names contain uppercase letters, causing the function to fail to retrieve the correct logo for these models.This issue affected models like
sambanova/Meta-Llama-3.1-405B-Instruct
andsambanova/Meta-Llama-3.1-70B-Instruct
, among others. This update ensures that model names are handled in a case-insensitive manner for modelsHow I tested
pnpm build
and ran it withpnpm preview --host
both for Desktop version(macbook m4) and Mobile version(iPhone 15pro).Screenshot with Desktop Test
Meta-Llama-3.1-70B-Instruct
Meta-Llama-3.1-405B-Instruct
Screenshot with Mobile Test