Class OciGenAiStreamingChatModelConfig.BuilderBase.OciGenAiStreamingChatModelConfigImpl
java.lang.Object
io.helidon.integrations.langchain4j.providers.oci.genai.OciGenAiStreamingChatModelConfig.BuilderBase.OciGenAiStreamingChatModelConfigImpl
- All Implemented Interfaces:
Prototype.Api,AiProvider.ModelLifecycle,OciGenAiStreamingChatModelConfig
- Enclosing class:
OciGenAiStreamingChatModelConfig.BuilderBase<BUILDER extends OciGenAiStreamingChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends OciGenAiStreamingChatModelConfig>
protected static class OciGenAiStreamingChatModelConfig.BuilderBase.OciGenAiStreamingChatModelConfigImpl
extends Object
implements OciGenAiStreamingChatModelConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.integrations.langchain4j.providers.oci.genai.OciGenAiStreamingChatModelConfig
OciGenAiStreamingChatModelConfig.Builder, OciGenAiStreamingChatModelConfig.BuilderBase<BUILDER extends OciGenAiStreamingChatModelConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends OciGenAiStreamingChatModelConfig> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionOptional<com.oracle.bmc.auth.BasicAuthenticationDetailsProvider> Authentication provider is by default used from default Service bean found in Service Registry.default booleanDisables automatic model close because close may wait for streaming callbacks that can still use the registry.OCI Compartment OCID.Optional<dev.langchain4j.model.chat.request.ChatRequestParameters> Generated fromBaseChatModel.Builder.defaultRequestParameters(dev.langchain4j.model.chat.request.ChatRequestParameters)booleanenabled()If set tofalse, OciGenAiStreamingChatModel will not be available even if configured.booleanCustom executor for asynchronous request startup and stream processing.Generated fromBaseChatModel.Builder.frequencyPenalty(java.lang.Double)Optional<com.oracle.bmc.generativeaiinference.GenerativeAiInferenceAsyncClient> Custom asynchronous OCI GenAI client.Optional<com.oracle.bmc.generativeaiinference.GenerativeAiInferenceClient> Custom http client builder.inthashCode()List<dev.langchain4j.model.chat.listener.ChatModelListener> Generated fromBaseChatModel.Builder.listeners(java.util.List)Modifies the likelihood of specified tokens that appear in the completion.logProbs()Generated fromBaseGenericChatModel.Builder.logProbs(java.lang.Integer)Generated fromBaseChatModel.Builder.maxTokens(java.lang.Integer)OCI LLM Model name or OCID.Generated fromBaseGenericChatModel.Builder.numGenerations(java.lang.Integer)Generated fromBaseChatModel.Builder.presencePenalty(java.lang.Double)com.oracle.bmc.Regionregion()Region is by default set to the current OCI region detected by OCI SDK.seed()Generated fromBaseChatModel.Builder.seed(java.lang.Integer)Optional<com.oracle.bmc.generativeaiinference.model.ServingMode.ServingType> Generated fromBaseChatModel.Builder.servingType(com.oracle.bmc.generativeaiinference.model.ServingMode.ServingType)stop()Generated fromBaseChatModel.Builder.stop(java.util.List)Generated fromBaseChatModel.Builder.temperature(java.lang.Double)topK()Generated fromBaseChatModel.Builder.topK(java.lang.Integer)topP()Generated fromBaseChatModel.Builder.topP(java.lang.Double)toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.integrations.langchain4j.providers.oci.genai.OciGenAiStreamingChatModelConfig
configuredBuilder
-
Field Details
-
PROVIDER_KEY
AI provider config key.- See Also:
-
CONFIG_ROOT
The root configuration key for this builder.- See Also:
-
-
Constructor Details
-
OciGenAiStreamingChatModelConfigImpl
protected OciGenAiStreamingChatModelConfigImpl(OciGenAiStreamingChatModelConfig.BuilderBase<?, ?> builder) Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
enabled
public boolean enabled()Description copied from interface:OciGenAiStreamingChatModelConfigIf set tofalse, OciGenAiStreamingChatModel will not be available even if configured.- Specified by:
enabledin interfaceOciGenAiStreamingChatModelConfig- Returns:
- whether OciGenAiStreamingChatModel is enabled, defaults to
true
-
topK
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.topK(java.lang.Integer)- Specified by:
topKin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Integer property
-
listeners
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.listeners(java.util.List)- Specified by:
listenersin interfaceOciGenAiStreamingChatModelConfig- Returns:
- List property
-
seed
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.seed(java.lang.Integer)- Specified by:
seedin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Integer property
-
logProbs
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseGenericChatModel.Builder.logProbs(java.lang.Integer)- Specified by:
logProbsin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Integer property
-
defaultRequestParameters
public Optional<dev.langchain4j.model.chat.request.ChatRequestParameters> defaultRequestParameters()Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.defaultRequestParameters(dev.langchain4j.model.chat.request.ChatRequestParameters)- Specified by:
defaultRequestParametersin interfaceOciGenAiStreamingChatModelConfig- Returns:
- ChatRequestParameters property
-
numGenerations
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseGenericChatModel.Builder.numGenerations(java.lang.Integer)- Specified by:
numGenerationsin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Integer property
-
topP
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.topP(java.lang.Double)- Specified by:
topPin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Double property
-
presencePenalty
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.presencePenalty(java.lang.Double)- Specified by:
presencePenaltyin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Double property
-
stop
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.stop(java.util.List)- Specified by:
stopin interfaceOciGenAiStreamingChatModelConfig- Returns:
- List property
-
servingType
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.servingType(com.oracle.bmc.generativeaiinference.model.ServingMode.ServingType)- Specified by:
servingTypein interfaceOciGenAiStreamingChatModelConfig- Returns:
- ServingType property
-
maxTokens
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.maxTokens(java.lang.Integer)- Specified by:
maxTokensin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Integer property
-
temperature
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.temperature(java.lang.Double)- Specified by:
temperaturein interfaceOciGenAiStreamingChatModelConfig- Returns:
- Double property
-
frequencyPenalty
Description copied from interface:OciGenAiStreamingChatModelConfigGenerated fromBaseChatModel.Builder.frequencyPenalty(java.lang.Double)- Specified by:
frequencyPenaltyin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Double property
-
executorService
Description copied from interface:OciGenAiStreamingChatModelConfigCustom executor for asynchronous request startup and stream processing. A directly supplied or registry-provided executor is borrowed and remains the responsibility of its owner; the model does not shut it down.- Specified by:
executorServicein interfaceOciGenAiStreamingChatModelConfig- Returns:
- the executor service
-
genAiAsyncClient
public Optional<com.oracle.bmc.generativeaiinference.GenerativeAiInferenceAsyncClient> genAiAsyncClient()Description copied from interface:OciGenAiStreamingChatModelConfigCustom asynchronous OCI GenAI client. A directly supplied or registry-provided client is borrowed and is not closed by the generated factory.- Specified by:
genAiAsyncClientin interfaceOciGenAiStreamingChatModelConfig- Returns:
- the asynchronous OCI GenAI client
-
modelName
Description copied from interface:OciGenAiStreamingChatModelConfigOCI LLM Model name or OCID.- Specified by:
modelNamein interfaceOciGenAiStreamingChatModelConfig- Returns:
- Model name or OCID
-
compartmentId
Description copied from interface:OciGenAiStreamingChatModelConfigOCI Compartment OCID.- Specified by:
compartmentIdin interfaceOciGenAiStreamingChatModelConfig- Returns:
- Compartment OCID
-
region
public com.oracle.bmc.Region region()Description copied from interface:OciGenAiStreamingChatModelConfigRegion is by default set to the current OCI region detected by OCI SDK.- Specified by:
regionin interfaceOciGenAiStreamingChatModelConfig- Returns:
- OCI Region to connect to
-
authProvider
Description copied from interface:OciGenAiStreamingChatModelConfigAuthentication provider is by default used from default Service bean found in Service Registry.- Specified by:
authProviderin interfaceOciGenAiStreamingChatModelConfig- Returns:
- OCI authentication details provider
-
genAiClient
Description copied from interface:OciGenAiStreamingChatModelConfigCustom http client builder.- Specified by:
genAiClientin interfaceOciGenAiStreamingChatModelConfig- Returns:
- the http client builder
-
logitBias
Description copied from interface:OciGenAiStreamingChatModelConfigModifies the likelihood of specified tokens that appear in the completion.Example: '{"6395": 2, "8134": 1, "21943": 0.5, "5923": -100}'
- Specified by:
logitBiasin interfaceOciGenAiStreamingChatModelConfig- Returns:
- a map
-
toString
-
equals
-
hashCode
public int hashCode() -
closeModelOnShutdown
default boolean closeModelOnShutdown()Disables automatic model close because close may wait for streaming callbacks that can still use the registry. This also leaves internally created clients open; callers using one must close the model explicitly after all operations complete and before registry shutdown starts.- Specified by:
closeModelOnShutdownin interfaceAiProvider.ModelLifecycle- Returns:
- always
false
-