mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-13 12:43:42 +08:00
feat: add pdf browser plugin
This commit is contained in:
@@ -23,6 +23,7 @@ import { BaiduSearch } from "@/app/api/langchain-tools/baidu_search";
|
||||
import { GoogleSearch } from "@/app/api/langchain-tools/google_search";
|
||||
import { StableDiffusionWrapper } from "@/app/api/langchain-tools/stable_diffusion_image_generator";
|
||||
import { ArxivAPIWrapper } from "@/app/api/langchain-tools/arxiv";
|
||||
import { PDFBrowser } from "@/app/api/langchain-tools/pdf_browser";
|
||||
|
||||
const serverConfig = getServerSideConfig();
|
||||
|
||||
@@ -254,6 +255,9 @@ async function handle(req: NextRequest) {
|
||||
tools.push(stableDiffusionTool);
|
||||
if (useTools.includes(arxivAPITool.name)) tools.push(arxivAPITool);
|
||||
|
||||
const pdfBrowserTool = new PDFBrowser(model, embeddings);
|
||||
tools.push(pdfBrowserTool);
|
||||
|
||||
useTools.forEach((toolName) => {
|
||||
if (toolName) {
|
||||
var tool = langchainTools[
|
||||
|
||||
Reference in New Issue
Block a user