fix: some regressions for tensorrt nightly build (#2380)
* fix: some regressions for tensorrt nightly build Signed-off-by: James <james@jan.ai> --------- Signed-off-by: hiro <hiro@jan.ai> Signed-off-by: James <james@jan.ai> Co-authored-by: hiro <hiro@jan.ai> Co-authored-by: James <james@jan.ai>
This commit is contained in:
parent
a6b483c9d9
commit
5f19983de1
@ -321,7 +321,7 @@ export default class JanModelExtension extends ModelExtension {
|
|||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(JanModelExtension._tensorRtEngineFormat)
|
.includes(JanModelExtension._tensorRtEngineFormat)
|
||||||
)
|
)
|
||||||
})?.length > 0 // TODO: NamH find better way (can use basename to check the file name with source url)
|
})?.length > 0 // TODO: find better way (can use basename to check the file name with source url)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@janhq/tensorrt-llm-extension",
|
"name": "@janhq/tensorrt-llm-extension",
|
||||||
"version": "0.0.3",
|
"version": "0.0.3",
|
||||||
"description": "Enables accelerated inference leveraging Nvidia's TensorRT-LLM for optimal GPU hardware optimizations. Compatible with models in TensorRT-LLM format. Requires Nvidia GPU driver and CUDA Toolkit installation.",
|
"description": "This extension enables Nvidia's TensorRT-LLM for the fastest GPU acceleration. See the [setup guide](https://jan.ai/guides/providers/tensorrt-llm/) for next steps.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"node": "dist/node/index.cjs.js",
|
"node": "dist/node/index.cjs.js",
|
||||||
"author": "Jan <service@jan.ai>",
|
"author": "Jan <service@jan.ai>",
|
||||||
|
|||||||
@ -246,7 +246,8 @@ const Advanced = () => {
|
|||||||
setGpuEnabled(true)
|
setGpuEnabled(true)
|
||||||
setShowNotification(false)
|
setShowNotification(false)
|
||||||
snackbar({
|
snackbar({
|
||||||
description: 'Successfully turned on GPU Accelertion',
|
description:
|
||||||
|
'Successfully turned on GPU Acceleration',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -257,7 +258,7 @@ const Advanced = () => {
|
|||||||
setGpuEnabled(false)
|
setGpuEnabled(false)
|
||||||
snackbar({
|
snackbar({
|
||||||
description:
|
description:
|
||||||
'Successfully turned off GPU Accelertion',
|
'Successfully turned off GPU Acceleration',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import {
|
|||||||
systemInformations,
|
systemInformations,
|
||||||
} from '@janhq/core'
|
} from '@janhq/core'
|
||||||
import {
|
import {
|
||||||
|
Badge,
|
||||||
Button,
|
Button,
|
||||||
Progress,
|
Progress,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
@ -20,6 +21,8 @@ import {
|
|||||||
import { InfoCircledIcon } from '@radix-ui/react-icons'
|
import { InfoCircledIcon } from '@radix-ui/react-icons'
|
||||||
import { useAtomValue } from 'jotai'
|
import { useAtomValue } from 'jotai'
|
||||||
|
|
||||||
|
import { Marked, Renderer } from 'marked'
|
||||||
|
|
||||||
import { extensionManager } from '@/extension'
|
import { extensionManager } from '@/extension'
|
||||||
import Extension from '@/extension/Extension'
|
import Extension from '@/extension/Extension'
|
||||||
import { installingExtensionAtom } from '@/helpers/atoms/Extension.atom'
|
import { installingExtensionAtom } from '@/helpers/atoms/Extension.atom'
|
||||||
@ -108,6 +111,8 @@ const TensorRtExtensionItem: React.FC<Props> = ({ item }) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const description = marked.parse(item.description ?? '', { async: false })
|
||||||
|
console.log(description)
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-4 last:border-none">
|
<div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-4 last:border-none">
|
||||||
<div className="flex-1 flex-shrink-0 space-y-1.5">
|
<div className="flex-1 flex-shrink-0 space-y-1.5">
|
||||||
@ -118,10 +123,12 @@ const TensorRtExtensionItem: React.FC<Props> = ({ item }) => {
|
|||||||
<p className="whitespace-pre-wrap text-sm font-semibold leading-relaxed">
|
<p className="whitespace-pre-wrap text-sm font-semibold leading-relaxed">
|
||||||
v{item.version}
|
v{item.version}
|
||||||
</p>
|
</p>
|
||||||
|
<Badge>Experimental</Badge>
|
||||||
</div>
|
</div>
|
||||||
<p className="whitespace-pre-wrap leading-relaxed">
|
{
|
||||||
{item.description}
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||||
</p>
|
<div dangerouslySetInnerHTML={{ __html: description }} />
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{(!compatibility || compatibility['platform']?.includes(PLATFORM)) &&
|
{(!compatibility || compatibility['platform']?.includes(PLATFORM)) &&
|
||||||
@ -204,7 +211,6 @@ const InstallStateIndicator: React.FC<InstallStateProps> = ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: NamH check for dark mode here
|
|
||||||
switch (installState) {
|
switch (installState) {
|
||||||
case 'Installed':
|
case 'Installed':
|
||||||
return (
|
return (
|
||||||
@ -223,4 +229,14 @@ const InstallStateIndicator: React.FC<InstallStateProps> = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const marked: Marked = new Marked({
|
||||||
|
renderer: {
|
||||||
|
link: (href, title, text) => {
|
||||||
|
return Renderer.prototype.link
|
||||||
|
?.apply(this, [href, title, text])
|
||||||
|
.replace('<a', "<a class='text-blue-500' target='_blank'")
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
export default TensorRtExtensionItem
|
export default TensorRtExtensionItem
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user