streaming, markdown, model selecting, and lots more
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import {
|
||||
LogoGrok,
|
||||
LogoGemini
|
||||
} from '#components';
|
||||
|
||||
interface ModelConfig {
|
||||
icon: any;
|
||||
keywords: RegExp[];
|
||||
brandColor: string;
|
||||
}
|
||||
|
||||
const MODEL_MAPPINGS: ModelConfig[] = [
|
||||
{
|
||||
icon: markRaw(LogoGrok),
|
||||
keywords: [/^grok-/, /^x-ai\//],
|
||||
brandColor: '#000000'
|
||||
},
|
||||
{
|
||||
icon: markRaw(LogoGemini),
|
||||
keywords: [/gemini-/],
|
||||
brandColor: '#000000'
|
||||
}
|
||||
];
|
||||
|
||||
export function getModelConfig(modelId: string) {
|
||||
const cleanId = modelId.toLowerCase();
|
||||
|
||||
const match = MODEL_MAPPINGS.find(cfg =>
|
||||
cfg.keywords.some(regex => regex.test(cleanId))
|
||||
);
|
||||
|
||||
return match || { icon: null, brandColor: '#64748b' };
|
||||
}
|
||||
Reference in New Issue
Block a user