commit
a990fa6c07
@ -27,7 +27,7 @@ export function useActiveModel() {
|
||||
(activeModel && activeModel.id === modelId) ||
|
||||
(stateModel.model === modelId && stateModel.loading)
|
||||
) {
|
||||
console.debug(`Model ${modelId} is already init. Ignore..`)
|
||||
console.debug(`Model ${modelId} is already initialized. Ignore..`)
|
||||
return
|
||||
}
|
||||
|
||||
@ -64,13 +64,13 @@ export function useActiveModel() {
|
||||
}))
|
||||
} else {
|
||||
console.debug(
|
||||
`Init model ${modelId} successfully!, take ${
|
||||
`Model ${modelId} successfully initialized! Took ${
|
||||
Date.now() - currentTime
|
||||
}ms`
|
||||
)
|
||||
setActiveModel(model)
|
||||
toaster({
|
||||
title: 'Success start a Model',
|
||||
title: 'Success!',
|
||||
description: `Model ${modelId} has been started.`,
|
||||
})
|
||||
setStateModel(() => ({
|
||||
@ -89,7 +89,7 @@ export function useActiveModel() {
|
||||
setActiveModel(undefined)
|
||||
setStateModel({ state: 'start', loading: false, model: '' })
|
||||
toaster({
|
||||
title: 'Success stop a Model',
|
||||
title: 'Success!',
|
||||
description: `Model ${modelId} has been stopped.`,
|
||||
})
|
||||
}, 500)
|
||||
|
||||
@ -49,7 +49,7 @@ export default function useSendChatMessage() {
|
||||
const summaryMsg: ChatCompletionMessage = {
|
||||
role: ChatCompletionRole.User,
|
||||
content:
|
||||
'summary this conversation in less than 5 words, the response should just include the summary',
|
||||
'Summarize this conversation in less than 5 words, the response should just include the summary',
|
||||
}
|
||||
// Request convo summary
|
||||
setTimeout(async () => {
|
||||
|
||||
@ -31,10 +31,7 @@ const ChatInstruction = () => {
|
||||
}
|
||||
return (
|
||||
<div className="mx-auto mb-20 flex flex-col space-y-2">
|
||||
<p>
|
||||
What does this Assistant do? How does it behave? What should it avoid
|
||||
doing?
|
||||
</p>
|
||||
<p>(Optional) Give your assistant an initial prompt.</p>
|
||||
{!isSettingInstruction && activeConvoId && (
|
||||
<>
|
||||
<Button
|
||||
@ -42,7 +39,7 @@ const ChatInstruction = () => {
|
||||
className="w-32"
|
||||
onClick={() => setIsSettingInstruction(true)}
|
||||
>
|
||||
Give Instruction
|
||||
Set a Prompt
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
@ -60,7 +57,7 @@ const ChatInstruction = () => {
|
||||
className="w-32"
|
||||
onClick={() => setSystemPrompt(instruction)}
|
||||
>
|
||||
Set Instruction
|
||||
Set a Prompt
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -197,8 +197,8 @@ const ChatScreen = () => {
|
||||
<div className="mx-auto mt-8 flex h-full w-3/4 flex-col items-center justify-center text-center">
|
||||
{downloadedModels.length === 0 && (
|
||||
<Fragment>
|
||||
<h1 className="text-lg font-medium">{`Ups, you don't have a Model`}</h1>
|
||||
<p className="mt-1">{`let’s download your first model.`}</p>
|
||||
<h1 className="text-lg font-medium">{`Oops, you don't have a Model`}</h1>
|
||||
<p className="mt-1">{`Let’s download your first model.`}</p>
|
||||
<Button
|
||||
className="mt-4"
|
||||
onClick={() =>
|
||||
@ -212,7 +212,7 @@ const ChatScreen = () => {
|
||||
{!activeModel && downloadedModels.length > 0 && (
|
||||
<Fragment>
|
||||
<h1 className="text-lg font-medium">{`You don’t have any actively running models`}</h1>
|
||||
<p className="mt-1">{`Please start a downloaded model in My Models page to use this feature.`}</p>
|
||||
<p className="mt-1">{`Please start a downloaded model to use this feature.`}</p>
|
||||
<Badge className="mt-4" themes="outline">
|
||||
<ShortCut menu="E" />
|
||||
to show your model
|
||||
|
||||
@ -25,17 +25,17 @@ export default function BlankStateMyModel() {
|
||||
<div className="text-center">
|
||||
<DatabaseIcon size={32} className="mx-auto text-muted-foreground" />
|
||||
<div className="mt-4">
|
||||
<h1 className="text-xl font-bold leading-snug">{`Ups, You don't have a model.`}</h1>
|
||||
<h1 className="text-xl font-bold leading-snug">{`Oops, you don't have a model yet.`}</h1>
|
||||
<p className="mt-1 text-base">
|
||||
{downloadStates.length > 0
|
||||
? `Downloading model ... `
|
||||
: `let’s download your first model`}
|
||||
: `Let’s download your first model`}
|
||||
</p>
|
||||
{downloadStates?.length > 0 && (
|
||||
<Modal>
|
||||
<ModalTrigger asChild>
|
||||
<Button themes="outline" className="mr-2 mt-6">
|
||||
<span>{downloadStates.length} Downloading model</span>
|
||||
<span>Downloading {downloadStates.length} model(s)</span>
|
||||
</Button>
|
||||
</ModalTrigger>
|
||||
<ModalContent>
|
||||
|
||||
@ -149,7 +149,7 @@ const MyModelsScreen = () => {
|
||||
<div className="rounded-lg border border-border bg-background p-4 hover:border-primary/60">
|
||||
<div className="flex h-full flex-col justify-between">
|
||||
<div>
|
||||
<h2 className="text-lg font-medium">Download more model?</h2>
|
||||
<h2 className="text-lg font-medium">Download more models?</h2>
|
||||
<p className="mt-2 leading-relaxed">
|
||||
You have <span>{downloadedModels.length}</span> model(s)
|
||||
downloaded.
|
||||
|
||||
@ -52,7 +52,7 @@ const PreferencePlugins = (props: Props) => {
|
||||
}
|
||||
toaster({
|
||||
title: formatPluginsName(pluginName),
|
||||
description: 'Success update preferences',
|
||||
description: 'Successfully updated preferences',
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ const WelcomeScreen = () => {
|
||||
>
|
||||
Welcome to Jan
|
||||
</h1>
|
||||
<p className="mt-1">{`let’s download your first model`}</p>
|
||||
<p className="mt-1">{`Let’s download your first model`}</p>
|
||||
<Button
|
||||
className="mt-4"
|
||||
onClick={() => setMainViewState(MainViewState.ExploreModels)}
|
||||
@ -47,7 +47,7 @@ const WelcomeScreen = () => {
|
||||
{downloadedModels.length >= 1 && !activeModel && (
|
||||
<Fragment>
|
||||
<h1 className="mt-2 text-lg font-medium">{`You don’t have any actively running models`}</h1>
|
||||
<p className="mt-1">{`Please start a downloaded model in My Models page to use this feature.`}</p>
|
||||
<p className="mt-1">{`Please start a downloaded model to use this feature.`}</p>
|
||||
<Badge className="mt-4" themes="outline">
|
||||
<ShortCut menu="E" />
|
||||
to show your model
|
||||
@ -57,7 +57,7 @@ const WelcomeScreen = () => {
|
||||
{downloadedModels.length >= 1 && activeModel && (
|
||||
<Fragment>
|
||||
<h1 className="mt-2 text-lg font-medium">{`Your Model is Active`}</h1>
|
||||
<p className="mt-1">{`You are ready to start conversations.`}</p>
|
||||
<p className="mt-1">{`You are ready to converse.`}</p>
|
||||
<Button
|
||||
className="mt-4"
|
||||
onClick={() => setMainViewState(MainViewState.Chat)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user