public class BaiDuAIParser extends AbstractAIParser
Copyright (c) 2020 xsx All Rights Reserved. x-easypdf-pdfbox is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v2 for more details.
Modifier and Type | Class and Description |
---|---|
protected static class |
BaiDuAIParser.ImageParser
图像解析器
|
protected static class |
BaiDuAIParser.Message
消息
|
protected static class |
BaiDuAIParser.Parser
解析器
|
protected static class |
BaiDuAIParser.TextParser
文本解析器
|
AbstractAIParser.ImageContent, AbstractAIParser.ImageUrl, AbstractAIParser.TextContent
config, taskIdKey
document, log
Constructor and Description |
---|
BaiDuAIParser(Document document,
String ak,
String sk)
有参构造
|
Modifier and Type | Method and Description |
---|---|
AIParseInfo |
parseImageWithPage(String prompt,
int pageIndex,
int imageIndex)
解析图像(页面中的图像)
|
AIParseInfo |
parsePageWithImage(String prompt,
int pageIndex)
解析页面(整个页面)
|
AIParseInfo |
parseTextWithPage(String prompt,
int beginPageIndex,
int endPageIndex)
解析文本(页面)
|
createImageMessageContents, createImageMessages, createTextMessages, getAuthorization, getPageImage, getPageImage, getPageText, getParseInfo, getRequestBody, getRequestHeaders, getResponse, parseImageInfo, parseInfo, parseTexInfo, parseTextWithDocument, setHttpClient, setImageModel, setImageSystemPrompt, setIsJsonResponse, setTextModel, setTextSystemPrompt
getDocument
public AIParseInfo parsePageWithImage(String prompt, int pageIndex)
注:访问大模型超时时间为1分钟
parsePageWithImage
in class AbstractAIParser
prompt
- 提示词pageIndex
- 页面索引public AIParseInfo parseImageWithPage(String prompt, int pageIndex, int imageIndex)
注:访问大模型超时时间为1分钟
parseImageWithPage
in class AbstractAIParser
prompt
- 提示词pageIndex
- 页面索引imageIndex
- 图像索引public AIParseInfo parseTextWithPage(String prompt, int beginPageIndex, int endPageIndex)
注:访问大模型超时时间为1分钟
parseTextWithPage
in class AbstractAIParser
prompt
- 提示词beginPageIndex
- 起始页面索引endPageIndex
- 结束页面索引Copyright © 2025. All rights reserved.