🐛fix: Jan-nano repo name changed (#5274)
This commit is contained in:
parent
c896398fab
commit
9ab69b157b
@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"author": "Menlo",
|
"author": "Menlo",
|
||||||
"id": "Menlo/Jan-nano",
|
"id": "Menlo/Jan-nano-gguf",
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"_id": "68492cd9cada68b1d11ca1bd",
|
"_id": "68492cd9cada68b1d11ca1bd",
|
||||||
"author": "Menlo",
|
"author": "Menlo",
|
||||||
@ -23,11 +23,11 @@
|
|||||||
"quantize_imatrix_file": "imatrix.dat",
|
"quantize_imatrix_file": "imatrix.dat",
|
||||||
"total": 4022468096
|
"total": 4022468096
|
||||||
},
|
},
|
||||||
"id": "Menlo/Jan-nano",
|
"id": "Menlo/Jan-nano-gguf",
|
||||||
"lastModified": "2025-06-13T16:57:55.000Z",
|
"lastModified": "2025-06-13T16:57:55.000Z",
|
||||||
"likes": 3,
|
"likes": 3,
|
||||||
"model-index": null,
|
"model-index": null,
|
||||||
"modelId": "Menlo/Jan-nano",
|
"modelId": "Menlo/Jan-nano-gguf",
|
||||||
"pipeline_tag": "text-generation",
|
"pipeline_tag": "text-generation",
|
||||||
"private": false,
|
"private": false,
|
||||||
"sha": "a04aab0878648d8f284c63a52664a482ead16f06",
|
"sha": "a04aab0878648d8f284c63a52664a482ead16f06",
|
||||||
|
|||||||
@ -28,7 +28,7 @@ type Data<T> = {
|
|||||||
/**
|
/**
|
||||||
* Defaul mode sources
|
* Defaul mode sources
|
||||||
*/
|
*/
|
||||||
const defaultModelSources = ['Menlo/Jan-nano']
|
const defaultModelSources = ['Menlo/Jan-nano-gguf']
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A extension for models
|
* A extension for models
|
||||||
@ -291,6 +291,8 @@ export default class JanModelExtension extends ModelExtension {
|
|||||||
const sources = await this.apiInstance()
|
const sources = await this.apiInstance()
|
||||||
.then((api) => api.get('v1/models/sources').json<Data<ModelSource>>())
|
.then((api) => api.get('v1/models/sources').json<Data<ModelSource>>())
|
||||||
.then((e) => (typeof e === 'object' ? (e.data as ModelSource[]) : []))
|
.then((e) => (typeof e === 'object' ? (e.data as ModelSource[]) : []))
|
||||||
|
// Deprecated source - filter out from legacy sources
|
||||||
|
.then((e) => e.filter((x) => x.id.toLowerCase() !== 'menlo/jan-nano'))
|
||||||
.catch(() => [])
|
.catch(() => [])
|
||||||
return sources.concat(
|
return sources.concat(
|
||||||
DEFAULT_MODEL_SOURCES.filter((e) => !sources.some((x) => x.id === e.id))
|
DEFAULT_MODEL_SOURCES.filter((e) => !sources.some((x) => x.id === e.id))
|
||||||
|
|||||||
@ -199,7 +199,8 @@ function Hub() {
|
|||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
|
||||||
const isRecommendedModel = useCallback((modelId: string) => {
|
const isRecommendedModel = useCallback((modelId: string) => {
|
||||||
return (extractModelName(modelId) === 'Jan-nano') as boolean
|
return (extractModelName(modelId)?.toLowerCase() ===
|
||||||
|
'jan-nano-gguf') as boolean
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const handleUseModel = useCallback(
|
const handleUseModel = useCallback(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user