feat: model load balancing (#4926)

This commit is contained in:
Nite Knite 2024-06-05 00:13:29 +08:00 • committed by GitHub
commit 37f292ea91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 1896 additions and 304 deletions

View file

@ -72,8 +72,8 @@ const BlockIcon: FC<BlockIconProps> = ({
}) => {
return (
<div className={`
flex items-center justify-center border-[0.5px] border-white/[0.02] text-white
${ICON_CONTAINER_CLASSNAME_SIZE_MAP[size]}
flex items-center justify-center border-[0.5px] border-white/2 text-white
${ICON_CONTAINER_CLASSNAME_SIZE_MAP[size]}
${ICON_CONTAINER_BG_COLOR_MAP[type]}
${toolIcon && '!shadow-none'}
${className}

View file

@ -61,7 +61,7 @@ const WorkflowChecklist = ({
>
<div
className={`
group flex items-center justify-center w-full h-full rounded-md cursor-pointer
group flex items-center justify-center w-full h-full rounded-md cursor-pointer
hover:bg-primary-50
${open && 'bg-primary-50'}
`}
@ -122,7 +122,7 @@ const WorkflowChecklist = ({
/>
{node.title}
</div>
<div className='border-t-[0.5px] border-t-black/[0.02]'>
<div className='border-t-[0.5px] border-t-black/2'>
{
node.unConnected && (
<div className='px-3 py-2 bg-gray-25 rounded-b-lg'>

View file

@ -11,7 +11,7 @@ const Operator = () => {
width: 102,
height: 72,
}}
className='!absolute !left-4 !bottom-14 z-[9] !m-0 !w-[102px] !h-[72px] !border-[0.5px] !border-black/[0.08] !rounded-lg !shadow-lg'
className='!absolute !left-4 !bottom-14 z-[9] !m-0 !w-[102px] !h-[72px] !border-[0.5px] !border-black/8 !rounded-lg !shadow-lg'
/>
<div className='flex items-center mt-1 gap-2 absolute left-4 bottom-4 z-[9]'>
<ZoomInOut />

View file

@ -71,7 +71,7 @@ const ChatRecord = () => {
return (
<div
className={`
flex flex-col w-[400px] rounded-l-2xl h-full border border-black/[0.02] shadow-xl
flex flex-col w-[400px] rounded-l-2xl h-full border border-black/2 shadow-xl
`}
style={{
background: 'linear-gradient(156deg, rgba(242, 244, 247, 0.80) 0%, rgba(242, 244, 247, 0.00) 99.43%), var(--white, #FFF)',

View file

@ -20,7 +20,7 @@ export type ChatWrapperRefType = {
}
const DebugAndPreview = () => {
const { t } = useTranslation()
const chatRef = useRef({ handleRestart: () => {} })
const chatRef = useRef({ handleRestart: () => { } })
const { handleCancelDebugAndPreviewPanel } = useWorkflowInteractions()
const { handleNodeCancelRunningStatus } = useNodesInteractions()
const { handleEdgeCancelRunningStatus } = useEdgesInteractions()
@ -40,7 +40,7 @@ const DebugAndPreview = () => {
return (
<div
className={cn(
'flex flex-col w-[400px] rounded-l-2xl h-full border border-black/[0.02]',
'flex flex-col w-[400px] rounded-l-2xl h-full border border-black/2',
)}
style={{
background: 'linear-gradient(156deg, rgba(242, 244, 247, 0.80) 0%, rgba(242, 244, 247, 0.00) 99.43%), var(--white, #FFF)',