diff --git a/docSite/content/zh-cn/docs/development/faq.md b/docSite/content/zh-cn/docs/development/faq.md index dd42b9807..a2e747f0b 100644 --- a/docSite/content/zh-cn/docs/development/faq.md +++ b/docSite/content/zh-cn/docs/development/faq.md @@ -26,45 +26,16 @@ images: [] ### sealos怎么挂载 小程序配置文件 新增配置文件:/app/projects/app/public/xxxx.txt -如图 + +如图: + ![](/imgs/faq2.png) ### 数据库3306端口被占用了,启动服务失败 + ![](/imgs/faq3.png) -mysql 只有 oneAPI 用到,外面一般不需要调用,所以可以 -- 把 3306:3306 的映射去掉/或者直接改一个映射。 - -```yaml -# 在 docker-compose.yaml 文件内 -# ... - mysql: - image: mysql:8.0.36 - ports: - - 3306:3306 # 这个端口被占用了! - # - 3307:3306 # 直接改一个。。和外面的不冲突 - # *empty* 或者直接删了,反正外面用不到 - oneapi: - container_name: oneapi - image: ghcr.io/songquanpeng/one-api:latest - environment: - - SQL_DSN=root:oneapimmysql@tcp(mysql:3306)/oneapi # 这不用改,容器内外网络是隔离的 -``` -- 另一种做法是可以直接连现有的 mysql, 要改 oneAPI 的环境变量。 -```yaml -# 在 docker-compose.yaml 文件内 -# ... -# mysql: # 要连外面的,这个玩意用不到了 -# image: mysql:8.0.36 -# ports: -# - 3306:3306 # 这个端口被占用了! -oneapi: - container_name: oneapi - image: ghcr.io/songquanpeng/one-api:latest - environment: - - SQL_DSN=root:oneapimmysql@tcp(mysql:3306)/oneapi # 改成外面的链接字符串 -``` - +把端口映射改成 3307 之类的,例如 3307:3306。 ### 本地部署的限制 diff --git a/docSite/content/zh-cn/docs/development/upgrading/4819.md b/docSite/content/zh-cn/docs/development/upgrading/4819.md index 7f3ad25f6..79b85e13b 100644 --- a/docSite/content/zh-cn/docs/development/upgrading/4819.md +++ b/docSite/content/zh-cn/docs/development/upgrading/4819.md @@ -19,4 +19,6 @@ weight: 806 7. 修复 - 语雀文件库导入时,嵌套文件内容无法展开的问题。 8. 修复 - 工作流编排中,LLM 参数无法关闭问题。 9. 修复 - 工作流编排中,代码运行节点还原模板问题。 -10. 修复 - HTTP 接口适配对象字符串解析。 \ No newline at end of file +10. 修复 - HTTP 接口适配对象字符串解析。 +11. 修复 - 通过 API 上传文件(localFile)接口,图片过期标记未清除。 +12. 修复 - 工作流导入编排时,number input 类型无法覆盖。 \ No newline at end of file diff --git a/docSite/content/zh-cn/docs/faq/other.md b/docSite/content/zh-cn/docs/faq/other.md index 09de91a1e..07c30f8b4 100644 --- a/docSite/content/zh-cn/docs/faq/other.md +++ b/docSite/content/zh-cn/docs/faq/other.md @@ -10,12 +10,6 @@ weight: 918 只有开源的 README,没官网,GitHub: https://github.com/songquanpeng/one-api -## 想做多用户和多chat key +## 想做多用户 -![](/imgs/other1.png) -![](/imgs/other2.png) - -多用户问题:只能采取二开或者商业版 - -多chat key问题:1. 私有化部署情况下,oneapi解决。2. Saas或者商业版中,可以为每个团队设置单独的key。 -![](/imgs/other3.png) +开源版未支持多用户,仅商业版支持。 \ No newline at end of file diff --git a/packages/web/components/common/Icon/index.tsx b/packages/web/components/common/Icon/index.tsx index 8ab758947..3256298c5 100644 --- a/packages/web/components/common/Icon/index.tsx +++ b/packages/web/components/common/Icon/index.tsx @@ -4,13 +4,23 @@ import { Box, Icon } from '@chakra-ui/react'; import { iconPaths } from './constants'; import type { IconNameType } from './type.d'; +const iconCache: Record = {}; + const MyIcon = ({ name, w = 'auto', h = 'auto', ...props }: { name: IconNameType } & IconProps) => { const [IconComponent, setIconComponent] = useState(null); useEffect(() => { + if (iconCache[name]) { + setIconComponent(iconCache[name]); + return; + } + iconPaths[name]?.() .then((icon) => { - setIconComponent({ as: icon.default }); + const component = { as: icon.default }; + // Store in cache + iconCache[name] = component; + setIconComponent(component); }) .catch((error) => console.log(error)); }, [name]); @@ -30,4 +40,4 @@ const MyIcon = ({ name, w = 'auto', h = 'auto', ...props }: { name: IconNameType ); }; -export default React.memo(MyIcon); +export default MyIcon; diff --git a/projects/app/src/components/core/ai/ModelTable/index.tsx b/projects/app/src/components/core/ai/ModelTable/index.tsx index 41547b6aa..0846b2cd3 100644 --- a/projects/app/src/components/core/ai/ModelTable/index.tsx +++ b/projects/app/src/components/core/ai/ModelTable/index.tsx @@ -25,7 +25,6 @@ import SearchInput from '@fastgpt/web/components/common/Input/SearchInput'; import { useSystemStore } from '@/web/common/system/useSystemStore'; import Avatar from '@fastgpt/web/components/common/Avatar'; import MyTag from '@fastgpt/web/components/common/Tag/index'; -import MyTooltip from '@fastgpt/web/components/common/MyTooltip'; import dynamic from 'next/dynamic'; const MyModal = dynamic(() => import('@fastgpt/web/components/common/MyModal')); @@ -237,15 +236,13 @@ const ModelTable = () => { - {modelList.map((item) => ( - + {modelList.map((item, index) => ( + - - - - {item.name} - - + + + {item.name} + {item.typeLabel} diff --git a/projects/app/src/pages/api/core/dataset/collection/create/localFile.ts b/projects/app/src/pages/api/core/dataset/collection/create/localFile.ts index 6f3876c2f..f8548f931 100644 --- a/projects/app/src/pages/api/core/dataset/collection/create/localFile.ts +++ b/projects/app/src/pages/api/core/dataset/collection/create/localFile.ts @@ -73,7 +73,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse): CreateCo const { collectionId, insertResults } = await createCollectionAndInsertData({ dataset, rawText, - relatedId: fileId, + relatedId: relatedImgId, createCollectionParams: { ...collectionData, name: collectionName, diff --git a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx index c3d56142c..2a7b8416c 100644 --- a/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx +++ b/projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/nodes/render/RenderInput/templates/NumberInput.tsx @@ -1,23 +1,16 @@ import React, { useMemo } from 'react'; import type { RenderInputProps } from '../type'; -import { - NumberDecrementStepper, - NumberIncrementStepper, - NumberInput, - NumberInputField, - NumberInputStepper -} from '@chakra-ui/react'; import { useContextSelector } from 'use-context-selector'; import { WorkflowContext } from '@/pages/app/detail/components/WorkflowComponents/context'; -import MyIcon from '@fastgpt/web/components/common/Icon'; +import MyNumberInput from '@fastgpt/web/components/common/Input/NumberInput'; const NumberInputRender = ({ item, nodeId }: RenderInputProps) => { const onChangeNode = useContextSelector(WorkflowContext, (v) => v.onChangeNode); const Render = useMemo(() => { return ( - { key: item.key, value: { ...item, - value: Number(e) + value: e } }); }} - > - - - - - - - - - - + /> ); }, [item, nodeId, onChangeNode]);