Class TemperatureStage
java.lang.Object
bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
bg.codexio.ai.openai.api.sdk.chat.TemperatureStage
- All Implemented Interfaces:
TerminalStage
Configures the temperature or in other words,
the creativity of the model. This is usually related
to temperature or topP parameters.
-
Field Summary
Fields inherited from class bg.codexio.ai.openai.api.sdk.chat.ChatConfigurationStage
executor, requestBuilder -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTemperatureStage(ChatHttpExecutor executor, bg.codexio.ai.openai.api.payload.chat.request.ChatMessageRequest.Builder requestBuilder) -
Method Summary
Modifier and TypeMethodDescriptionBypass all configuration steps and go directly toChatRuntimeSelectionStage.creativeAs(bg.codexio.ai.openai.api.payload.creativity.Creativity creativity) Configures temperatureGoes to manually configuring some non-trivial options such as tools, tokens and accuracy.Configures all parameters to be mostly deterministic.You may receive a lot of irrelevancy.
Highly creative parameters with less deterministic properties.Configures all parameters to be balanced between creativity and determinism.Configures all parameters to be mostly deterministic, but also a little bit creative.You may receive total non-sense in the answers .
Configures all parameters to the highest creativity with little to none determinism and a lot of repetitions.scaleRepetitionToCreativity(bg.codexio.ai.openai.api.payload.creativity.Creativity creativity) Configures temperature and additionally configures topP, frequencyPenalty and presencePenalty by applying approximation for topP and inverse function for the penalties.
-
Constructor Details
-
TemperatureStage
protected TemperatureStage(ChatHttpExecutor executor, bg.codexio.ai.openai.api.payload.chat.request.ChatMessageRequest.Builder requestBuilder)
-
-
Method Details
-
creativeAs
Configures temperature- Parameters:
creativity-Creativity- Returns:
MessageStageto add prompts
-
scaleRepetitionToCreativity
public MessageStage scaleRepetitionToCreativity(bg.codexio.ai.openai.api.payload.creativity.Creativity creativity) Configures temperature and additionally configures topP, frequencyPenalty and presencePenalty by applying approximation for topP and inverse function for the penalties.- Parameters:
creativity-Creativity- Returns:
MessageStageto add prompts
-
deterministic
Configures all parameters to be mostly deterministic. This sets zero randomness in the temperature and top_p sampling.- Returns:
MessageStageto add prompts
-
predictable
Configures all parameters to be mostly deterministic, but also a little bit creative.- Returns:
MessageStageto add prompts
-
inventive
Configures all parameters to be balanced between creativity and determinism.- Returns:
MessageStageto add prompts
-
imaginative
You may receive a lot of irrelevancy.
Highly creative parameters with less deterministic properties.- Returns:
MessageStageto add prompts
-
randomized
You may receive total non-sense in the answers .
Configures all parameters to the highest creativity with little to none determinism and a lot of repetitions.- Returns:
MessageStageto add prompts
-
deepConfigure
Goes to manually configuring some non-trivial options such as tools, tokens and accuracy. After successful configuration, useManualConfigurationStage.done()to go to the nextMessageStage.- Returns:
ManualConfigurationStage
-
andRespond
Bypass all configuration steps and go directly toChatRuntimeSelectionStage.- Specified by:
andRespondin interfaceTerminalStage- Returns:
ChatRuntimeSelectionStageto select runtime and then prompt the API.
-