类 OpenAIConfig
java.lang.Object
com.sh.ai.impl.AIBaseConfig
com.sh.ai.impl.openai.OpenAIConfig
- 所有已实现的接口:
Serializable
OpenAI连接参数
- 另请参阅:
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String从类继承的字段 com.sh.ai.impl.AIBaseConfig
addSkill, apiKey, baseUrl, debug, from, mcpServerList, memory, options, query, sessionId, sessionName, system, toolAppendSystem, toolList, user -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明clearMemory(String sessionId) 清除记忆com.openai.client.OpenAIClient添加到头部,即加入倒序,用于在加载历史最新10条会话时用loadMemory(String sessionId) 加载记忆消息setCompressMemory(boolean hasCompressMemory) storeMemory(String sessionId) 缓存消息从类继承的方法 com.sh.ai.impl.AIBaseConfig
addLocalFile, addMcpServer, addOption, addTool, clearLocalFile, getApiKey, getBaseUrl, getCommonParamObj, getErrorMsg, getFileList, getFrom, getMcpServerList, getMcpTool, getOptions, getPrompt, getQuery, getSessionId, getSessionName, getSystem, getTool, getToolArg, getToolList, getUser, hasTool, isAddSkill, isDebug, isToolAppendSystem, setAddSkill, setApiKey, setBaseUrl, setCommonParamObj, setDebug, setFrom, setMemory, setQuery, setSessionId, setSessionName, setSystem, setToolAppendSystem, setToolArgsMap, setUser
-
字段详细资料
-
构造器详细资料
-
OpenAIConfig
public OpenAIConfig()
-
-
方法详细资料
-
createOpenAIClient
public com.openai.client.OpenAIClient createOpenAIClient() -
setModel
-
clearMemory
清除记忆- 参数:
sessionId-- 返回:
OpenAIConfig
-
loadMemory
加载记忆消息- 参数:
sessionId-- 返回:
-
storeMemory
缓存消息- 参数:
sessionId-- 返回:
-
addMessageMemory
-
insertHeadMessageMemory
添加到头部,即加入倒序,用于在加载历史最新10条会话时用- 参数:
msg-- 返回:
-
setCompressMemory
-