类 OpenAITool
java.lang.Object
io.agentscope.core.formatter.openai.dto.OpenAITool
OpenAI tool definition DTO.
This class represents a tool that can be called by the model.
Example:
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static OpenAIToolfunction(OpenAIToolFunction function) Create a function tool.getType()voidsetFunction(OpenAIToolFunction function) void
-
构造器详细资料
-
OpenAITool
public OpenAITool() -
OpenAITool
-
-
方法详细资料
-
getType
-
setType
-
getFunction
-
setFunction
-
function
Create a function tool.- 参数:
function- the function definition- 返回:
- a new OpenAITool
-