mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-24 13:53:50 +00:00
IOS safari whisper support (#2870)
* fix: variables check * remove log * perf: safari whisper * feat: comment * perf: connetion check * doc
This commit is contained in:
@@ -94,7 +94,7 @@ curl --location --request POST 'https://{{host}}/api/admin/init/4811' \
|
|||||||
--header 'Content-Type: application/json'
|
--header 'Content-Type: application/json'
|
||||||
```
|
```
|
||||||
|
|
||||||
会初始化成员组。
|
会初始化团队成员组。
|
||||||
|
|
||||||
## V4.8.11 更新说明
|
## V4.8.11 更新说明
|
||||||
|
|
||||||
@@ -120,8 +120,9 @@ curl --location --request POST 'https://{{host}}/api/admin/init/4811' \
|
|||||||
20. 修复 - 工作流工具调用中修改全局变量后,无法传递到后续流程。
|
20. 修复 - 工作流工具调用中修改全局变量后,无法传递到后续流程。
|
||||||
21. 优化 - 流输出,切换浏览器 Tab 后仍可以继续输出。
|
21. 优化 - 流输出,切换浏览器 Tab 后仍可以继续输出。
|
||||||
22. 优化 - 完善外部文件知识库相关 API
|
22. 优化 - 完善外部文件知识库相关 API
|
||||||
23. 修复 - 知识库选择权限问题。
|
23. 优化 - IOS Safari 浏览器,语音输入不准确。
|
||||||
24. 修复 - 空 chatId 发起对话,首轮携带用户选择时会异常。
|
24. 修复 - 知识库选择权限问题。
|
||||||
25. 修复 - createDataset 接口,intro 为赋值。
|
25. 修复 - 空 chatId 发起对话,首轮携带用户选择时会异常。
|
||||||
26. 修复 - 对话框渲染性能问题。
|
26. 修复 - createDataset 接口,intro 为赋值。
|
||||||
27. 修复 - 工具调用历史记录存储不正确。
|
27. 修复 - 对话框渲染性能问题。
|
||||||
|
28. 修复 - 工具调用历史记录存储不正确。
|
||||||
|
@@ -184,6 +184,7 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
|
|||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
// Just show
|
||||||
const formattedRequestBody: Record<string, any> = (() => {
|
const formattedRequestBody: Record<string, any> = (() => {
|
||||||
if (requestBody instanceof FormData || requestBody instanceof URLSearchParams) {
|
if (requestBody instanceof FormData || requestBody instanceof URLSearchParams) {
|
||||||
return Object.fromEntries(requestBody);
|
return Object.fromEntries(requestBody);
|
||||||
|
@@ -286,7 +286,7 @@ const ChatInput = ({
|
|||||||
/>
|
/>
|
||||||
<Flex alignItems={'center'} position={'absolute'} right={[2, 4]} bottom={['10px', '12px']}>
|
<Flex alignItems={'center'} position={'absolute'} right={[2, 4]} bottom={['10px', '12px']}>
|
||||||
{/* voice-input */}
|
{/* voice-input */}
|
||||||
{whisperConfig.open && !havInput && !isChatting && !!whisperModel && (
|
{whisperConfig.open && !inputValue && !isChatting && !!whisperModel && (
|
||||||
<>
|
<>
|
||||||
<canvas
|
<canvas
|
||||||
ref={canvasRef}
|
ref={canvasRef}
|
||||||
|
@@ -23,8 +23,9 @@ export const ToolTargetHandle = ({ show, nodeId }: ToolHandleProps) => {
|
|||||||
const connected = edges.some((edge) => edge.target === nodeId && edge.targetHandle === handleId);
|
const connected = edges.some((edge) => edge.target === nodeId && edge.targetHandle === handleId);
|
||||||
|
|
||||||
// if top handle is connected, return null
|
// if top handle is connected, return null
|
||||||
const showHandle =
|
const showHandle = connectingEdge
|
||||||
connected || (show && connectingEdge?.handleId === NodeOutputKeyEnum.selectedTools);
|
? show && connectingEdge.handleId === NodeOutputKeyEnum.selectedTools
|
||||||
|
: connected;
|
||||||
|
|
||||||
const Render = useMemo(() => {
|
const Render = useMemo(() => {
|
||||||
return (
|
return (
|
||||||
|
@@ -85,10 +85,13 @@ export const useSpeech = (props?: OutLinkChatAuthProps & { appId?: string }) =>
|
|||||||
if (!cancelWhisperSignal.current) {
|
if (!cancelWhisperSignal.current) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
let options = {};
|
let options = {};
|
||||||
if (MediaRecorder.isTypeSupported('audio/webm')) {
|
|
||||||
options = { type: 'audio/webm' };
|
if (MediaRecorder.isTypeSupported('video/webm; codecs=vp9')) {
|
||||||
} else if (MediaRecorder.isTypeSupported('video/mp3')) {
|
options = { mimeType: 'video/webm; codecs=vp9' };
|
||||||
options = { type: 'video/mp3' };
|
} else if (MediaRecorder.isTypeSupported('video/webm')) {
|
||||||
|
options = { type: 'video/webm' };
|
||||||
|
} else if (MediaRecorder.isTypeSupported('video/mp4')) {
|
||||||
|
options = { mimeType: 'video/mp4', videoBitsPerSecond: 100000 };
|
||||||
} else {
|
} else {
|
||||||
console.error('no suitable mimetype found for this device');
|
console.error('no suitable mimetype found for this device');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user