refactor: simplify response sender logic for Google endpoint

This commit is contained in:
Danny Avila 2025-06-21 15:02:52 -04:00
parent 8543e1e16e
commit d0c6ecb35d
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956

View file

@ -275,15 +275,11 @@ export const getResponseSender = (endpointOption: t.TEndpointOption): string =>
if (endpoint === EModelEndpoint.google) { if (endpoint === EModelEndpoint.google) {
if (modelLabel) { if (modelLabel) {
return modelLabel; return modelLabel;
} else if (model && (model.includes('gemini') || model.includes('learnlm'))) {
return 'Gemini';
} else if (model?.toLowerCase().includes('gemma') === true) { } else if (model?.toLowerCase().includes('gemma') === true) {
return 'Gemma'; return 'Gemma';
} else if (model && model.includes('code')) {
return 'Codey';
} }
return 'PaLM2'; return 'Gemini';
} }
if (endpoint === EModelEndpoint.custom || endpointType === EModelEndpoint.custom) { if (endpoint === EModelEndpoint.custom || endpointType === EModelEndpoint.custom) {