mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-03 13:38:00 +00:00
File input (#2270)
* doc * feat: file upload config * perf: chat box file params * feat: markdown show file * feat: chat file store and clear * perf: read file contentType * feat: llm vision config * feat: file url output * perf: plugin error text * perf: image load * feat: ai chat document * perf: file block ui * feat: read file node * feat: file read response field * feat: simple mode support read files * feat: tool call * feat: read file histories * perf: select file * perf: select file config * i18n * i18n * fix: ts; feat: tool response preview result
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { search, SafeSearchType } from 'duck-duck-scrape';
|
||||
import { delay } from '@fastgpt/global/common/system/utils';
|
||||
import { addLog } from '@fastgpt/service/common/system/log';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
|
||||
type Props = {
|
||||
query: string;
|
||||
@@ -35,7 +36,7 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
result: getErrText(error, 'Failed to fetch data from DuckDuckGo')
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { searchImages, SafeSearchType } from 'duck-duck-scrape';
|
||||
import { delay } from '@fastgpt/global/common/system/utils';
|
||||
import { addLog } from '@fastgpt/service/common/system/log';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
|
||||
type Props = {
|
||||
query: string;
|
||||
@@ -33,7 +34,7 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
result: getErrText(error, 'Failed to fetch data from DuckDuckGo')
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { searchNews, SafeSearchType } from 'duck-duck-scrape';
|
||||
import { delay } from '@fastgpt/global/common/system/utils';
|
||||
import { addLog } from '@fastgpt/service/common/system/log';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
|
||||
type Props = {
|
||||
query: string;
|
||||
@@ -34,7 +35,7 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
result: getErrText(error, 'Failed to fetch data from DuckDuckGo')
|
||||
};
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { searchVideos, SafeSearchType } from 'duck-duck-scrape';
|
||||
import { delay } from '@fastgpt/global/common/system/utils';
|
||||
import { addLog } from '@fastgpt/service/common/system/log';
|
||||
import { getErrText } from '@fastgpt/global/common/error/utils';
|
||||
|
||||
type Props = {
|
||||
query: string;
|
||||
@@ -34,7 +35,7 @@ const main = async (props: Props, retry = 3): Response => {
|
||||
if (retry <= 0) {
|
||||
addLog.warn('DuckDuckGo error', { error });
|
||||
return {
|
||||
result: 'Failed to fetch data'
|
||||
result: getErrText(error, 'Failed to fetch data from DuckDuckGo')
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user