Class ToolStage
java.lang.Object
bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
bg.codexio.ai.openai.api.sdk.chat.ToolStage
Configures tools such as functions.
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
executor, requestBuilder -
Method Summary
Modifier and TypeMethodDescriptionand()Go backchooseTool(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool) Adds a tool and set it as toolChoice.justAdd(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool) Adds a tool.withTool(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool, boolean shouldChoose) Adds a tool and set it as toolChoice if true.
-
Method Details
-
withTool
public ToolStage withTool(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool, boolean shouldChoose) Adds a tool and set it as toolChoice if true.- Parameters:
tool-ChatToolsuch asGetNearbyPlaces.CHOICEshouldChoose- boolean whether to add it in toolChoice- Returns:
- self
-
chooseTool
Adds a tool and set it as toolChoice.- Parameters:
tool-ChatToolsuch asGetNearbyPlaces.CHOICE- Returns:
- self
-
justAdd
Adds a tool.- Parameters:
tool-ChatToolsuch asGetNearbyPlaces.CHOICE- Returns:
- self
-
and
Go back- Returns:
ManualConfigurationStage
-