chore: correct model author with new cortexso update (#4754)

This commit is contained in:
Louis 2025-02-27 15:08:38 +07:00 committed by GitHub
parent 5682aa3a7e
commit f586c19951
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 15 additions and 23 deletions

View File

@ -61,6 +61,7 @@ export interface ModelSibling {
*/ */
export interface ModelSource { export interface ModelSource {
id: string id: string
author?: string
metadata: Metadata metadata: Metadata
models: ModelSibling[] models: ModelSibling[]
type?: string type?: string

View File

@ -1 +1 @@
1.0.11-rc3 1.0.11-rc4

View File

@ -1,6 +1,6 @@
[ [
{ {
"author": "cortexso", "author": "CohereForAI",
"id": "cortexso/command-r", "id": "cortexso/command-r",
"metadata": { "metadata": {
"_id": "66751b98585f2bf57092b2ae", "_id": "66751b98585f2bf57092b2ae",
@ -90,7 +90,7 @@
] ]
}, },
{ {
"author": "cortexso", "author": "Google",
"id": "cortexso/gemma2", "id": "cortexso/gemma2",
"metadata": { "metadata": {
"_id": "66b06c37491b555fefe0a0bf", "_id": "66b06c37491b555fefe0a0bf",
@ -264,7 +264,7 @@
] ]
}, },
{ {
"author": "cortexso", "author": "CohereForAI",
"id": "cortexso/aya", "id": "cortexso/aya",
"metadata": { "metadata": {
"_id": "66790e21db26e8589ccd3816", "_id": "66790e21db26e8589ccd3816",
@ -314,7 +314,7 @@
] ]
}, },
{ {
"author": "cortexso", "author": "Qwen",
"id": "cortexso/qwen2.5", "id": "cortexso/qwen2.5",
"metadata": { "metadata": {
"_id": "671d0d55748faf685e6450a3", "_id": "671d0d55748faf685e6450a3",
@ -740,7 +740,7 @@
] ]
}, },
{ {
"author": "cortexso", "author": "meta-llama",
"id": "cortexso/llama3.2", "id": "cortexso/llama3.2",
"metadata": { "metadata": {
"_id": "66f63309ba963b1db95deaa4", "_id": "66f63309ba963b1db95deaa4",
@ -888,7 +888,7 @@
] ]
}, },
{ {
"author": "cortexso", "author": "DeepSeek-AI",
"id": "cortexso/deepseek-r1", "id": "cortexso/deepseek-r1",
"metadata": { "metadata": {
"_id": "67a0bcf13ac2dd6adf0bdfcf", "_id": "67a0bcf13ac2dd6adf0bdfcf",
@ -1142,7 +1142,7 @@
] ]
}, },
{ {
"author": "cortexso", "author": "meta-llama",
"id": "cortexso/llama3.1", "id": "cortexso/llama3.1",
"metadata": { "metadata": {
"_id": "66a76e01a1037fe261a5a472", "_id": "66a76e01a1037fe261a5a472",

View File

@ -34,10 +34,6 @@ import {
getDownloadingModelAtom, getDownloadingModelAtom,
} from '@/helpers/atoms/Model.atom' } from '@/helpers/atoms/Model.atom'
import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom' import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom'
import {
nvidiaTotalVramAtom,
totalRamAtom,
} from '@/helpers/atoms/SystemBar.atom'
type Props = { type Props = {
model: ModelSource model: ModelSource
@ -50,14 +46,9 @@ const ModelItemHeader = ({ model, onSelectedModel }: Props) => {
const downloadedModels = useAtomValue(downloadedModelsAtom) const downloadedModels = useAtomValue(downloadedModelsAtom)
const setSelectedSetting = useSetAtom(selectedSettingAtom) const setSelectedSetting = useSetAtom(selectedSettingAtom)
const { requestCreateNewThread } = useCreateNewThread() const { requestCreateNewThread } = useCreateNewThread()
const totalRam = useAtomValue(totalRamAtom)
const nvidiaTotalVram = useAtomValue(nvidiaTotalVramAtom)
const setMainViewState = useSetAtom(mainViewStateAtom) const setMainViewState = useSetAtom(mainViewStateAtom)
// Default nvidia returns vram in MB, need to convert to bytes to match the unit of totalRamW
const ram = nvidiaTotalVram > 0 ? nvidiaTotalVram * 1024 * 1024 : totalRam
const serverEnabled = useAtomValue(serverEnabledAtom) const serverEnabled = useAtomValue(serverEnabledAtom)
const assistants = useAtomValue(assistantsAtom) const assistants = useAtomValue(assistantsAtom)

View File

@ -41,10 +41,10 @@ const ModelItem: React.FC<Props> = ({ model, onSelectedModel }) => {
</Markdown> </Markdown>
</div> </div>
<div className="mb-6 flex flex-row divide-x"> <div className="mb-6 flex flex-row divide-x">
{model.metadata?.author && ( {(model?.author ?? model?.metadata?.author) && (
<p <p
className="font-regular mt-3 line-clamp-1 flex flex-row pr-4 capitalize text-[hsla(var(--text-secondary))]" className="font-regular mt-3 line-clamp-1 flex flex-row pr-4 capitalize text-[hsla(var(--text-secondary))]"
title={model.metadata?.author} title={model?.author ?? model?.metadata?.author}
> >
{model.id?.includes('huggingface.co') && ( {model.id?.includes('huggingface.co') && (
<> <>
@ -57,7 +57,7 @@ const ModelItem: React.FC<Props> = ({ model, onSelectedModel }) => {
/>{' '} />{' '}
</> </>
)}{' '} )}{' '}
{model.metadata?.author} {model?.author ?? model?.metadata?.author}
</p> </p>
)} )}
{model.models?.length > 0 && ( {model.models?.length > 0 && (

View File

@ -102,10 +102,10 @@ const ModelPage = ({ model, onGoBack }: Props) => {
</div> </div>
</div> </div>
<div className="mb-6 flex flex-row divide-x"> <div className="mb-6 flex flex-row divide-x">
{model.metadata?.author && ( {(model?.author ?? model?.metadata?.author) && (
<p <p
className="font-regular mt-3 line-clamp-1 flex flex-row pr-4 capitalize text-[hsla(var(--text-secondary))]" className="font-regular mt-3 line-clamp-1 flex flex-row pr-4 capitalize text-[hsla(var(--text-secondary))]"
title={model.metadata?.author} title={model?.author ?? model?.metadata?.author}
> >
{model.id?.includes('huggingface.co') && ( {model.id?.includes('huggingface.co') && (
<> <>
@ -118,7 +118,7 @@ const ModelPage = ({ model, onGoBack }: Props) => {
/>{' '} />{' '}
</> </>
)} )}
{model.metadata?.author} {model?.author ?? model?.metadata?.author}
</p> </p>
)} )}
{model.models?.length > 0 && ( {model.models?.length > 0 && (