rename rate limit

This commit is contained in:
Henry 2024-03-13 01:13:36 +08:00
parent 4a6e71058c
commit a4a2fbb08f
2 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ import { useState } from 'react'
import { createPortal } from 'react-dom'
import { Box, Dialog, DialogContent, DialogTitle, Tabs, Tab } from '@mui/material'
import SpeechToText from '@/ui-component/extended/SpeechToText'
import Configuration from '@/views/chatflows/Configuration'
import RateLimit from '@/ui-component/extended/RateLimit'
import AllowedDomains from '@/ui-component/extended/AllowedDomains'
import ChatFeedback from '@/ui-component/extended/ChatFeedback'
import AnalyseFlow from '@/ui-component/extended/AnalyseFlow'
@ -99,7 +99,7 @@ const ChatflowConfigurationDialog = ({ show, dialogProps, onCancel }) => {
</Tabs>
{CHATFLOW_CONFIGURATION_TABS.map((item, index) => (
<TabPanel key={index} value={tabValue} index={index}>
{item.id === 'rateLimiting' && <Configuration />}
{item.id === 'rateLimiting' && <RateLimit />}
{item.id === 'conversationStarters' ? <StarterPrompts dialogProps={dialogProps} /> : null}
{item.id === 'speechToText' ? <SpeechToText dialogProps={dialogProps} /> : null}
{item.id === 'chatFeedback' ? <ChatFeedback dialogProps={dialogProps} /> : null}

View File

@ -18,7 +18,7 @@ import chatflowsApi from '@/api/chatflows'
import useNotifier from '@/utils/useNotifier'
import { TooltipWithParser } from '@/ui-component/tooltip/TooltipWithParser'
const Configuration = () => {
const RateLimit = () => {
const dispatch = useDispatch()
const chatflow = useSelector((state) => state.canvas.chatflow)
const chatflowid = chatflow.id
@ -59,7 +59,7 @@ const Configuration = () => {
})
if (saveResp.data) {
enqueueSnackbar({
message: 'API Configuration Saved',
message: 'Rate Limit Configuration Saved',
options: {
key: new Date().getTime() + Math.random(),
variant: 'success',
@ -78,7 +78,7 @@ const Configuration = () => {
? error.response.data || `${error.response.status}: ${error.response.statusText}`
: error.message
enqueueSnackbar({
message: `Failed to save API Configuration: ${errorData}`,
message: `Failed to save Rate Limit Configuration: ${errorData}`,
options: {
key: new Date().getTime() + Math.random(),
variant: 'error',
@ -151,8 +151,8 @@ const Configuration = () => {
)
}
Configuration.propTypes = {
RateLimit.propTypes = {
isSessionMemory: PropTypes.bool
}
export default Configuration
export default RateLimit