mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
oenapi doc (#493)
* mongo init * perf: mongo connect * docs * fix: select file * format * remove seed * doc format * doc * perf: tts model type * doc * upload time * doc * doc * doc
This commit is contained in:
@@ -118,8 +118,6 @@
|
||||
"model": "tts-1",
|
||||
"name": "OpenAI TTS1",
|
||||
"price": 0,
|
||||
"baseUrl": "",
|
||||
"key": "",
|
||||
"voices": [
|
||||
{ "label": "Alloy", "value": "alloy", "bufferId": "openai-Alloy" },
|
||||
{ "label": "Echo", "value": "echo", "bufferId": "openai-Echo" },
|
||||
|
@@ -286,7 +286,7 @@ ${images.map((img) => JSON.stringify({ src: img.src })).join('\n')}
|
||||
transform={'translateY(1px)'}
|
||||
onClick={() => {
|
||||
if (isSpeaking) return;
|
||||
onOpenSelectFile;
|
||||
onOpenSelectFile();
|
||||
}}
|
||||
>
|
||||
<MyTooltip label={t('core.chat.Select File')}>
|
||||
|
@@ -174,7 +174,7 @@ const Navbar = ({ unread }: { unread: number }) => {
|
||||
</Link>
|
||||
</Box>
|
||||
)}
|
||||
{feConfigs?.show_doc && (
|
||||
{feConfigs?.docUrl && (
|
||||
<MyTooltip label={t('home.Docs')} placement={'right-end'}>
|
||||
<Box
|
||||
{...itemStyles}
|
||||
|
@@ -27,7 +27,6 @@ const MySelect = (
|
||||
selectRef: any
|
||||
) => {
|
||||
const ref = useRef<HTMLButtonElement>(null);
|
||||
const SelectRef = useRef<HTMLDivElement>(null);
|
||||
const menuItemStyles = {
|
||||
borderRadius: 'sm',
|
||||
py: 2,
|
||||
@@ -40,13 +39,6 @@ const MySelect = (
|
||||
const { isOpen, onOpen, onClose } = useDisclosure();
|
||||
const selectItem = useMemo(() => list.find((item) => item.value === value), [list, value]);
|
||||
|
||||
useOutsideClick({
|
||||
ref: SelectRef,
|
||||
handler: () => {
|
||||
onClose();
|
||||
}
|
||||
});
|
||||
|
||||
return (
|
||||
<Menu
|
||||
autoSelect={false}
|
||||
@@ -56,13 +48,6 @@ const MySelect = (
|
||||
strategy={'fixed'}
|
||||
matchWidth
|
||||
>
|
||||
{/* <Box
|
||||
ref={SelectRef}
|
||||
position={'relative'}
|
||||
onClick={() => {
|
||||
isOpen ? onClose() : onOpen();
|
||||
}}
|
||||
> */}
|
||||
<MenuButton
|
||||
as={Button}
|
||||
ref={ref}
|
||||
|
@@ -66,7 +66,7 @@ const AIChatSettingsModal = ({
|
||||
title={
|
||||
<Flex alignItems={'flex-end'}>
|
||||
{t('app.AI Advanced Settings')}
|
||||
{feConfigs?.show_doc && (
|
||||
{feConfigs?.docUrl && (
|
||||
<Link
|
||||
href={`${feConfigs.docUrl}/docs/use-cases/ai_settings/`}
|
||||
target={'_blank'}
|
||||
|
@@ -247,7 +247,7 @@ const UserInfo = () => {
|
||||
)}
|
||||
</Flex>
|
||||
</Box>
|
||||
{feConfigs?.show_doc && (
|
||||
{feConfigs?.docUrl && (
|
||||
<>
|
||||
<Flex
|
||||
mt={4}
|
||||
|
@@ -52,11 +52,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
|
||||
model: ttsConfig.model,
|
||||
voice: ttsConfig.voice,
|
||||
speed: ttsConfig.speed,
|
||||
props: {
|
||||
// temp code
|
||||
baseUrl: ttsModel.baseUrl || '',
|
||||
key: ttsModel.key || ''
|
||||
},
|
||||
onSuccess: async ({ model, buffer }) => {
|
||||
try {
|
||||
pushAudioSpeechBill({
|
||||
|
@@ -49,9 +49,8 @@ const defaultFeConfigs: FeConfigsType = {
|
||||
show_emptyChat: true,
|
||||
show_contact: true,
|
||||
show_git: true,
|
||||
show_doc: true,
|
||||
docUrl: 'https://docs.fastgpt.run',
|
||||
openAPIDocUrl: 'https://doc.fastgpt.run/docs/development/openapi',
|
||||
docUrl: 'https://docs.fastgpt.in',
|
||||
openAPIDocUrl: 'https://doc.fastgpt.in/docs/development/openapi',
|
||||
systemTitle: 'FastGPT',
|
||||
authorText: 'Made by FastGPT Team.',
|
||||
limit: {
|
||||
|
@@ -353,7 +353,7 @@ function EditLinkModal({
|
||||
/>
|
||||
</Flex>
|
||||
<Link
|
||||
href={`${feConfigs.docUrl}/docs/development/openapi/#分享链接中增加额外-query`}
|
||||
href={`${feConfigs.docUrl}/docs/development/openapi/share`}
|
||||
target={'_blank'}
|
||||
fontSize={'sm'}
|
||||
color={'myGray.500'}
|
||||
|
@@ -41,7 +41,7 @@ const Navbar = () => {
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(feConfigs?.show_doc
|
||||
...(feConfigs?.docUrl
|
||||
? [
|
||||
{
|
||||
label: t('home.Docs'),
|
||||
|
@@ -141,7 +141,7 @@ const LoginForm = ({ setPageType, loginSuccess }: Props) => {
|
||||
注册账号
|
||||
</Box>
|
||||
</Flex>
|
||||
{feConfigs?.show_doc && (
|
||||
{feConfigs?.docUrl && (
|
||||
<Box textAlign={'center'} mt={2} fontSize={'sm'}>
|
||||
使用即代表你同意我们的{' '}
|
||||
<Link
|
||||
|
@@ -39,7 +39,7 @@ const Tools = () => {
|
||||
}
|
||||
]
|
||||
: []),
|
||||
...(feConfigs?.show_doc
|
||||
...(feConfigs?.docUrl
|
||||
? [
|
||||
{
|
||||
icon: 'courseLight',
|
||||
|
@@ -128,7 +128,7 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
|
||||
temperature,
|
||||
max_tokens,
|
||||
stream,
|
||||
seed: temperature < 0.3 ? 1 : undefined,
|
||||
// seed: temperature < 0.3 ? 1 : undefined,
|
||||
messages: concatMessages
|
||||
},
|
||||
{
|
||||
|
@@ -9,7 +9,7 @@ export const postUploadFiles = (
|
||||
onUploadProgress: (progressEvent: AxiosProgressEvent) => void
|
||||
) =>
|
||||
POST<string[]>('/common/file/upload', data, {
|
||||
timeout: 60000,
|
||||
timeout: 48000,
|
||||
onUploadProgress,
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data; charset=utf-8'
|
||||
|
Reference in New Issue
Block a user