chore: bumb nitro version (#740)
* chore: take out experimental feature and bump nitro version * chore: update inference module to use nitro 0.1.17
This commit is contained in:
parent
9bf39cb406
commit
0ffc81e0f8
@ -1 +1 @@
|
|||||||
0.1.11
|
0.1.17
|
||||||
@ -20,15 +20,12 @@ import { twMerge } from 'tailwind-merge'
|
|||||||
|
|
||||||
import LogoMark from '@/containers/Brand/Logo/Mark'
|
import LogoMark from '@/containers/Brand/Logo/Mark'
|
||||||
|
|
||||||
import { FeatureToggleContext } from '@/context/FeatureToggle'
|
|
||||||
|
|
||||||
import { MainViewState } from '@/constants/screens'
|
import { MainViewState } from '@/constants/screens'
|
||||||
|
|
||||||
import { useMainViewState } from '@/hooks/useMainViewState'
|
import { useMainViewState } from '@/hooks/useMainViewState'
|
||||||
|
|
||||||
export default function RibbonNav() {
|
export default function RibbonNav() {
|
||||||
const { mainViewState, setMainViewState } = useMainViewState()
|
const { mainViewState, setMainViewState } = useMainViewState()
|
||||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
|
||||||
|
|
||||||
const onMenuClick = (state: MainViewState) => {
|
const onMenuClick = (state: MainViewState) => {
|
||||||
if (mainViewState === state) return
|
if (mainViewState === state) return
|
||||||
@ -49,8 +46,6 @@ export default function RibbonNav() {
|
|||||||
]
|
]
|
||||||
|
|
||||||
const secondaryMenus = [
|
const secondaryMenus = [
|
||||||
// Add menu if experimental feature
|
|
||||||
...(experimentalFeatureEnabed ? [] : []),
|
|
||||||
{
|
{
|
||||||
name: 'Explore Models',
|
name: 'Explore Models',
|
||||||
icon: <CpuIcon size={20} className="flex-shrink-0" />,
|
icon: <CpuIcon size={20} className="flex-shrink-0" />,
|
||||||
|
|||||||
@ -28,7 +28,6 @@ import { MainViewState } from '@/constants/screens'
|
|||||||
import { useMainViewState } from '@/hooks/useMainViewState'
|
import { useMainViewState } from '@/hooks/useMainViewState'
|
||||||
|
|
||||||
export default function CommandSearch() {
|
export default function CommandSearch() {
|
||||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
|
||||||
const { setMainViewState } = useMainViewState()
|
const { setMainViewState } = useMainViewState()
|
||||||
|
|
||||||
const menus = [
|
const menus = [
|
||||||
@ -44,8 +43,6 @@ export default function CommandSearch() {
|
|||||||
),
|
),
|
||||||
state: MainViewState.Chat,
|
state: MainViewState.Chat,
|
||||||
},
|
},
|
||||||
// Added experimental feature here
|
|
||||||
...(experimentalFeatureEnabed ? [] : []),
|
|
||||||
{
|
{
|
||||||
name: 'Explore Models',
|
name: 'Explore Models',
|
||||||
icon: <CpuIcon size={16} className="mr-3 text-muted-foreground" />,
|
icon: <CpuIcon size={16} className="mr-3 text-muted-foreground" />,
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
import { useContext } from 'react'
|
|
||||||
|
|
||||||
import { useAtomValue } from 'jotai'
|
import { useAtomValue } from 'jotai'
|
||||||
|
|
||||||
import { FeatureToggleContext } from '@/context/FeatureToggle'
|
|
||||||
|
|
||||||
import ChatInstruction from '../ChatInstruction'
|
import ChatInstruction from '../ChatInstruction'
|
||||||
import ChatItem from '../ChatItem'
|
import ChatItem from '../ChatItem'
|
||||||
|
|
||||||
@ -11,15 +7,12 @@ import { getCurrentChatMessagesAtom } from '@/helpers/atoms/ChatMessage.atom'
|
|||||||
|
|
||||||
const ChatBody: React.FC = () => {
|
const ChatBody: React.FC = () => {
|
||||||
const messages = useAtomValue(getCurrentChatMessagesAtom)
|
const messages = useAtomValue(getCurrentChatMessagesAtom)
|
||||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full w-full flex-col-reverse overflow-y-auto">
|
<div className="flex h-full w-full flex-col-reverse overflow-y-auto">
|
||||||
{messages.map((message) => (
|
{messages.map((message) => (
|
||||||
<ChatItem {...message} key={message.id} />
|
<ChatItem {...message} key={message.id} />
|
||||||
))}
|
))}
|
||||||
{experimentalFeatureEnabed && messages.length === 0 && (
|
{messages.length === 0 && <ChatInstruction />}
|
||||||
<ChatInstruction />
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,12 +31,12 @@ const ChatInstruction = () => {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto mb-20 flex flex-col space-y-2">
|
<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>
|
||||||
{!isSettingInstruction && activeConvoId && (
|
{!isSettingInstruction && activeConvoId && (
|
||||||
<>
|
<>
|
||||||
<p>
|
|
||||||
What does this Assistant do? How does it behave? What should it
|
|
||||||
avoid doing?
|
|
||||||
</p>
|
|
||||||
<Button
|
<Button
|
||||||
themes={'outline'}
|
themes={'outline'}
|
||||||
className="w-32"
|
className="w-32"
|
||||||
|
|||||||
@ -50,7 +50,6 @@ const marked = new Marked(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
||||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
|
||||||
const parsedText = marked.parse(props.content ?? '')
|
const parsedText = marked.parse(props.content ?? '')
|
||||||
const isUser = props.role === ChatCompletionRole.User
|
const isUser = props.role === ChatCompletionRole.User
|
||||||
const isSystem = props.role === ChatCompletionRole.System
|
const isSystem = props.role === ChatCompletionRole.System
|
||||||
@ -61,7 +60,7 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
|||||||
const messages = useAtomValue(getCurrentChatMessagesAtom)
|
const messages = useAtomValue(getCurrentChatMessagesAtom)
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.status === MessageStatus.Ready || !experimentalFeatureEnabed) {
|
if (props.status === MessageStatus.Ready) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const currentTimestamp = new Date().getTime() // Get current time in milliseconds
|
const currentTimestamp = new Date().getTime() // Get current time in milliseconds
|
||||||
@ -91,18 +90,16 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
|||||||
{!isUser && !isSystem && <LogoMark width={20} />}
|
{!isUser && !isSystem && <LogoMark width={20} />}
|
||||||
<div className="text-sm font-extrabold capitalize">{props.role}</div>
|
<div className="text-sm font-extrabold capitalize">{props.role}</div>
|
||||||
<p className="text-xs font-medium">{displayDate(props.createdAt)}</p>
|
<p className="text-xs font-medium">{displayDate(props.createdAt)}</p>
|
||||||
{experimentalFeatureEnabed && (
|
<div
|
||||||
<div
|
className={twMerge(
|
||||||
className={twMerge(
|
'absolute right-0 cursor-pointer transition-all',
|
||||||
'absolute right-0 cursor-pointer transition-all',
|
messages[0].id === props.id
|
||||||
messages[0].id === props.id
|
? 'absolute -bottom-10 left-4'
|
||||||
? 'absolute -bottom-10 left-4'
|
: 'hidden group-hover:flex'
|
||||||
: 'hidden group-hover:flex'
|
)}
|
||||||
)}
|
>
|
||||||
>
|
<MessageToolbar message={props} />
|
||||||
<MessageToolbar message={props} />
|
</div>
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={twMerge('w-full')}>
|
<div className={twMerge('w-full')}>
|
||||||
@ -122,12 +119,11 @@ const SimpleTextMessage: React.FC<ThreadMessage> = (props) => {
|
|||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{experimentalFeatureEnabed &&
|
{(props.status === MessageStatus.Pending || tokenSpeed > 0) && (
|
||||||
(props.status === MessageStatus.Pending || tokenSpeed > 0) && (
|
<p className="mt-2 text-xs font-medium text-foreground">
|
||||||
<p className="mt-2 text-xs font-medium text-foreground">
|
Token Speed: {Number(tokenSpeed).toFixed(2)}/s
|
||||||
Token Speed: {Number(tokenSpeed).toFixed(2)}/s
|
</p>
|
||||||
</p>
|
)}
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,8 +64,6 @@ const ChatScreen = () => {
|
|||||||
const [isModelAvailable, setIsModelAvailable] = useState(
|
const [isModelAvailable, setIsModelAvailable] = useState(
|
||||||
downloadedModels.some((x) => x.id === currentConvo?.modelId)
|
downloadedModels.some((x) => x.id === currentConvo?.modelId)
|
||||||
)
|
)
|
||||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
|
||||||
|
|
||||||
const textareaRef = useRef<HTMLTextAreaElement>(null)
|
const textareaRef = useRef<HTMLTextAreaElement>(null)
|
||||||
const { startModel } = useActiveModel()
|
const { startModel } = useActiveModel()
|
||||||
const modelRef = useRef(activeModel)
|
const modelRef = useRef(activeModel)
|
||||||
@ -176,20 +174,16 @@ const ChatScreen = () => {
|
|||||||
Download Model
|
Download Model
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{experimentalFeatureEnabed && (
|
<Paintbrush
|
||||||
<Paintbrush
|
size={16}
|
||||||
size={16}
|
className="cursor-pointer text-muted-foreground"
|
||||||
className="cursor-pointer text-muted-foreground"
|
onClick={() => cleanConvo()}
|
||||||
onClick={() => cleanConvo()}
|
/>
|
||||||
/>
|
<Trash2Icon
|
||||||
)}
|
size={16}
|
||||||
{
|
className="cursor-pointer text-muted-foreground"
|
||||||
<Trash2Icon
|
onClick={() => deleteConvo()}
|
||||||
size={16}
|
/>
|
||||||
className="cursor-pointer text-muted-foreground"
|
|
||||||
onClick={() => deleteConvo()}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user