Class OpenAITool
java.lang.Object
io.agentscope.core.chat.completions.model.OpenAITool
OpenAI tool definition for Chat Completions API requests.
This class represents a tool that can be called by the model, following OpenAI's format.
Example:
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for deserialization.OpenAITool(OpenAIToolFunction function) Creates a new OpenAITool with the specified function. -
Method Summary
-
Constructor Details
-
OpenAITool
public OpenAITool()Default constructor for deserialization. -
OpenAITool
Creates a new OpenAITool with the specified function.- Parameters:
function- The function definition
-
-
Method Details
-
getType
-
setType
-
getFunction
-
setFunction
-