@@ -6,8 +6,8 @@ export interface IShortModel {
description: string
slug: string
image: string
- blocked: boolean
- tags: IModelTag[]
+ blocked: boolean
+ tags: IModelTag[]
actual_stat: {
generation_time: string
tokens_cost: string
@@ -15,15 +15,15 @@ export interface IShortModel {
}
export interface IModelTag {
- title: string
- icon: string
- color: string
+ title: string
+ icon: string
+ color: string
}
export interface IModel {
uid: string
title: string
- blocked: boolean
+ blocked: boolean
description: string
slug: string
image: string
@@ -31,7 +31,8 @@ export interface IModel {
parameters: IModelParams[]
versions: IModelVersions[]
inputs: IModelInputs[]
- tags: IModelTag[]
+ instruction?: { descriptor: string }
+ tags: IModelTag[]
}
export interface IModelParams {
name: string
@@ -204,6 +204,7 @@ const Page: NextPageWithLayout = () => {
{
deleteMessage: (message_uid: string) => void
modelTitle: string | undefined
currentVersion: string
+ botParams: IModel | null
tags: IModelTag[]
}
@@ -54,6 +55,7 @@ function Chat({
openMobileFilters,
setFile,
file,
+ botParams,
getMessagesPagination,
input_types,
deleteMessage,
@@ -112,6 +114,7 @@ function Chat({
}}
>
Promise
deleteMessage?: (message_uid: string) => void
modelTitle: string | undefined
+ botParams: IModel | null
setResendValue: (value: string) => void
onLoadImage?: (event: React.ChangeEvent | null, file?: File) => void
loading: boolean
@@ -32,7 +34,7 @@ export const ChatMessagesList: React.FC = memo(
modelTitle,
device,
modelType,
- mode,
+ botParams,
getMessagesPagination,
deleteMessage,
loading,
@@ -189,7 +191,7 @@ export const ChatMessagesList: React.FC = memo(
)}
{messageResponse?.length === 0 && status === 'authenticated' ? (
- <>{desktop && modelType !== 'deepl' && }>
+ <>{desktop && modelType !== 'deepl' && }>
) : (
messageResponse?.map((message, idx) => {
return (
@@ -1,44 +1,59 @@
import React from 'react'
import { Box, Typography } from '@mui/material'
+import { IModel } from '#/entities/model-entity'
const previewMessages = ['Что такое орбитальная механика?', 'Как приготовить омлет?', 'Кто такие Фиксики?']
-export function PreviewView(props: any) {
+export interface PreviewViewProps {
+ setValue: Function
+ botParams: IModel | null
+}
+
+export function PreviewView({ setValue, botParams }: PreviewViewProps) {
return (
-
- Не знаете, с чего начать?
-
- Попробуйте, например, вот так:
-
-
+ Не знаете, с чего начать?
+ ')
+ : 'Попробуйте, например, вот так:',
}}
- >
- {previewMessages.map((el) => {
- return (
- props.setValue(el)}
- sx={{
- cursor: 'pointer',
- padding: '15px',
- color: '#8280FF',
- width: 'fit-content',
- marginTop: '15px',
- backgroundColor: 'rgba(130, 128, 255, 0.10)',
- borderRadius: '12px',
- }}
- >
- {el}
-
- )
- })}
-
+ style={{ textAlign: 'center', marginBottom: '15px' }}
+ className='text'
+ >
+ {botParams && !botParams.instruction && (
+
+ {previewMessages.map((el) => {
+ return (
+ setValue(el)}
+ sx={{
+ cursor: 'pointer',
+ padding: '15px',
+ color: '#8280FF',
+ width: 'fit-content',
+ marginTop: '15px',
+ backgroundColor: 'rgba(130, 128, 255, 0.10)',
+ borderRadius: '12px',
+ }}
+ >
+ {el}
+
+ )
+ })}
+
+ )}
)
}