接口的使用
io.agentscope.core.formatter.Formatter
使用Formatter的程序包
程序包
说明
-
io.agentscope.core.formatter中Formatter的使用
修饰符和类型类说明classAbstractBaseFormatter<TReq,TResp, TParams> Abstract base formatter providing common functionality for all formatter implementations. -
io.agentscope.core.formatter.anthropic中Formatter的使用
修饰符和类型类说明classAbstract base formatter for Anthropic API with shared logic for handling Anthropic-specific requirements.classFormatter for Anthropic Messages API.classMulti-agent formatter for Anthropic Messages API. -
io.agentscope.core.formatter.dashscope中Formatter的使用
修饰符和类型类说明classFormatter for DashScope Conversation/Generation APIs.classDashScope formatter for multi-agent conversations. -
io.agentscope.core.formatter.gemini中Formatter的使用
修饰符和类型类说明classFormatter for Gemini Content Generation API.classGemini formatter for multi-agent conversations. -
io.agentscope.core.formatter.ollama中Formatter的使用
修饰符和类型类说明classFormatter for Ollama Chat API.classOllama formatter for multi-agent conversations. -
io.agentscope.core.formatter.openai中Formatter的使用
修饰符和类型类说明classFormatter for DeepSeek Chat models (deepseek-chat, deepseek-coder).classMulti-agent formatter for DeepSeek Chat models.classFormatter for Zhipu GLM models (glm-4, glm-3-turbo, etc.).classMulti-agent formatter for Zhipu GLM models.classBase formatter for OpenAI Chat Completion HTTP API.classFormatter for OpenAI Chat Completion HTTP API.classMulti-agent formatter for OpenAI Chat Completion HTTP API. -
io.agentscope.core.model中Formatter的使用
参数类型为Formatter的io.agentscope.core.model中的方法修饰符和类型方法说明DashScopeChatModel.Builder.formatter(Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter) Sets the message formatter to use.GeminiChatModel.Builder.formatter(Formatter<com.google.genai.types.Content, com.google.genai.types.GenerateContentResponse, com.google.genai.types.GenerateContentConfig.Builder> formatter) Sets the formatter.OllamaChatModel.Builder.formatter(Formatter<OllamaMessage, OllamaResponse, OllamaRequest> formatter) OpenAIChatModel.Builder.formatter(Formatter<OpenAIMessage, OpenAIResponse, OpenAIRequest> formatter) Sets the message formatter to use.参数类型为Formatter的io.agentscope.core.model中的构造器限定符构造器说明DashScopeChatModel(String apiKey, String modelName, boolean stream, Boolean enableThinking, Boolean enableSearch, EndpointType endpointType, GenerateOptions defaultOptions, String baseUrl, Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter, HttpTransport httpTransport, String publicKeyId, String publicKey) Creates a new DashScope chat model instance with explicit API type.DashScopeChatModel(String apiKey, String modelName, boolean stream, Boolean enableThinking, Boolean enableSearch, GenerateOptions defaultOptions, String baseUrl, Formatter<DashScopeMessage, DashScopeResponse, DashScopeRequest> formatter, HttpTransport httpTransport, String publicKeyId, String publicKey) Creates a new DashScope chat model instance with automatic API type detection.GeminiChatModel(String apiKey, String modelName, boolean streamEnabled, String project, String location, Boolean vertexAI, com.google.genai.types.HttpOptions httpOptions, com.google.auth.oauth2.GoogleCredentials credentials, com.google.genai.types.ClientOptions clientOptions, GenerateOptions defaultOptions, Formatter<com.google.genai.types.Content, com.google.genai.types.GenerateContentResponse, com.google.genai.types.GenerateContentConfig.Builder> formatter) Creates a new Gemini chat model instance.OllamaChatModel(String modelName, String baseUrl, OllamaOptions defaultOptions, Formatter<OllamaMessage, OllamaResponse, OllamaRequest> formatter, HttpTransport httpTransport) Creates a new OllamaChatModel.