Package com.tnsai.llm
Interface LLMSpecSource
- All Known Implementing Classes:
LLMResolver.LLMSpec
public interface LLMSpecSource
Common interface for LLM configuration sources.
This interface allows different LLM configuration implementations to be used interchangeably in the LLM resolution chain.
Implementations
LLMResolver.LLMSpec- Basic config (model + temperature)- PortableLLMSpec (tnsai-integration) - Extended config with provider and options
Usage
// Any LLMSpecSource can be used with LLMResolver
LLMClient llm = LLMResolver.builder()
.actionLLMSpec(portableLLMSpec) // PortableLLMSpec implements LLMSpecSource
.configFactory(cfg -> createClient(cfg))
.resolve();
- Author:
- TnsAI Team
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanChecks if temperature is specified.model()Returns the model name/identifier.Returns the sampling temperature.
-
Method Details
-
model
String model()Returns the model name/identifier.- Returns:
- the model name, may be null
-
temperature
Float temperature()Returns the sampling temperature.- Returns:
- the temperature, may be null if not specified
-
hasTemperature
default boolean hasTemperature()Checks if temperature is specified.- Returns:
- true if temperature is not null
-