jan/web/utils/model.ts
Louis 81fea5665b
chore: enhance onboarding screen's models (#4723)
* chore: enhance onboarding screen's models

* chore: lint fix

* chore: correct lint fix command

* chore: fix tests
2025-02-25 09:36:55 +07:00

20 lines
646 B
TypeScript

/**
* Extracts and normalizes the model ID from a given download URL.
*
* @param downloadUrl - The URL from which to extract the model ID.
* @returns The extracted model ID, or the original URL if extraction fails.
*/
export const normalizeModelId = (downloadUrl: string): string => {
return downloadUrl.split('/').pop() ?? downloadUrl
}
/**
* Default models to recommend to users when they first open the app.
* TODO: These will be replaced when we have a proper recommendation system
* AND cortexso repositories are updated with tags.
*/
export const manualRecommendationModel = [
'cortexso/deepseek-r1',
'cortexso/llama3.2',
]