类 OllamaConfig
java.lang.Object
com.sh.ai.impl.AIBaseConfig
com.sh.ai.impl.ollama.OllamaConfig
- 所有已实现的接口:
Serializable
Ollama连接参数
- 另请参阅:
-
字段概要
从类继承的字段 com.sh.ai.impl.AIBaseConfig
addSkill, apiKey, baseUrl, debug, from, mcpServerList, memory, options, query, sessionId, sessionName, system, toolAppendSystem, toolList, user -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明addLocalFile(File file) clearMemory(String sessionId) 清除记忆io.github.ollama4j.OllamaAPI生成ollama连接对象io.github.ollama4j.models.chat.OllamaChatRequestBuilderloadMemory(String sessionId) 加载记忆消息setBaseUrl(String url) setChatBuilder(io.github.ollama4j.models.chat.OllamaChatRequestBuilder chatBuilder) setPassword(String password) storeMemory(String chatId) 缓存消息从类继承的方法 com.sh.ai.impl.AIBaseConfig
addMcpServer, addOption, addTool, getApiKey, getBaseUrl, getCommonParamObj, getErrorMsg, getFileList, getFrom, getMcpServerList, getMcpTool, getOptions, getPrompt, getQuery, getSessionId, getSessionName, getSystem, getTool, getToolArg, getToolList, getUser, hasTool, isAddSkill, isDebug, isToolAppendSystem, setAddSkill, setCommonParamObj, setDebug, setFrom, setMemory, setQuery, setSessionId, setSessionName, setSystem, setToolAppendSystem, setToolArgsMap
-
构造器详细资料
-
OllamaConfig
public OllamaConfig()
-
-
方法详细资料
-
createOllamaAPI
public io.github.ollama4j.OllamaAPI createOllamaAPI()生成ollama连接对象 -
clearMemory
清除记忆- 参数:
sessionId-- 返回:
OllamaConfig
-
loadMemory
加载记忆消息- 参数:
sessionId-- 返回:
-
storeMemory
缓存消息- 参数:
chatId-- 返回:
-
setBaseUrl
- 覆盖:
setBaseUrl在类中AIBaseConfig
-
setUser
- 覆盖:
setUser在类中AIBaseConfig
-
setPassword
-
setApiKey
- 覆盖:
setApiKey在类中AIBaseConfig
-
setModel
-
addLocalFile
- 覆盖:
addLocalFile在类中AIBaseConfig
-
clearLocalFile
- 覆盖:
clearLocalFile在类中AIBaseConfig
-
setChatBuilder
public OllamaConfig setChatBuilder(io.github.ollama4j.models.chat.OllamaChatRequestBuilder chatBuilder) -
getChatBuilder
public io.github.ollama4j.models.chat.OllamaChatRequestBuilder getChatBuilder()
-