Skip to content

Commit

Permalink
更新Doc2X插件:适配新接口 (#3159)
Browse files Browse the repository at this point in the history
* fix: doc2x now not hava the picture API

* fix: 适配doc2x V2 API

* Update to axios to request doc2x

* Add time out
  • Loading branch information
Menghuan1918 authored Nov 14, 2024
1 parent 795904a commit be59c2f
Show file tree
Hide file tree
Showing 10 changed files with 341 additions and 2,187 deletions.
17 changes: 4 additions & 13 deletions packages/plugins/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@ import { cloneDeep } from 'lodash';
import { WorkerNameEnum, runWorker } from '@fastgpt/service/worker/utils';

// Run in main thread
const staticPluginList = [
'getTime',
'fetchUrl',
'Doc2X',
'Doc2X/URLPDF2text',
'Doc2X/URLImg2text',
`Doc2X/FilePDF2text`,
`Doc2X/FileImg2text`,
'feishu',
'google',
'bing'
];
const staticPluginList = ['getTime', 'fetchUrl', 'feishu', 'google', 'bing'];
// Run in worker thread (Have npm packages)
const packagePluginList = [
'mathExprVal',
Expand All @@ -28,7 +17,9 @@ const packagePluginList = [
'drawing',
'drawing/baseChart',
'wiki',
'databaseConnection'
'databaseConnection',
'Doc2X',
'Doc2X/PDF2text'
];

export const list = [...staticPluginList, ...packagePluginList];
Expand Down
172 changes: 0 additions & 172 deletions packages/plugins/src/Doc2X/FileImg2text/index.ts

This file was deleted.

165 changes: 0 additions & 165 deletions packages/plugins/src/Doc2X/FilePDF2text/index.ts

This file was deleted.

Loading

0 comments on commit be59c2f

Please sign in to comment.