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