Class ToolStage
- java.lang.Object
-
- bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
-
- bg.codexio.ai.openai.api.sdk.chat.ToolStage
-
public class ToolStage extends ChatConfigurationStage
Configures tools such as functions.
-
-
Field Summary
-
Fields inherited from class bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
executor, requestBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManualConfigurationStageand()Go backToolStagechooseTool(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool)Adds a tool and set it as toolChoice.ToolStagejustAdd(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool)Adds a tool.ToolStagewithTool(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool, boolean shouldChoose)Adds a tool and set it as toolChoice if true.
-
-
-
Method Detail
-
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
public ToolStage chooseTool(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool)
Adds a tool and set it as toolChoice.- Parameters:
tool-ChatToolsuch asGetNearbyPlaces.CHOICE- Returns:
- self
-
justAdd
public ToolStage justAdd(bg.codexio.ai.openai.api.payload.chat.request.ChatTool tool)
Adds a tool.- Parameters:
tool-ChatToolsuch asGetNearbyPlaces.CHOICE- Returns:
- self
-
and
public ManualConfigurationStage and()
Go back- Returns:
ManualConfigurationStage
-
-