org.llm4s.spring

Members list

Type members

Classlikes

Sizing of the executor behind LLM4STemplate's completeAsync (llm4s.async.*).

Sizing of the executor behind LLM4STemplate's completeAsync (llm4s.async.*).

Attributes

Supertypes
class Object
trait Matchable
class Any

Health indicator settings (llm4s.health.*).

Health indicator settings (llm4s.health.*).

Attributes

Supertypes
class Object
trait Matchable
class Any
final case class HealthSettings(provider: String, model: String, probe: Boolean, ttl: Duration, timeout: Duration, secrets: Seq[String])

What the indicator reports about and how it probes; the secrets are only used to redact messages.

What the indicator reports about and how it probes; the secrets are only used to redact messages.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final class LLM4STemplate(client: JLlmClient, executor: ExecutorService)

Spring-friendly entry point to an LLM.

Spring-friendly entry point to an LLM.

complete and tryComplete block the calling thread. completeAsync never does: the blocking call runs on executor (the llm4sTaskExecutor bean) and the returned future completes from there. Cancelling the future with cancel(true) interrupts the provider call, which is how llm4s cancels work; a failure completes the future exceptionally with the LlmException.

Attributes

Supertypes
class Object
trait Matchable
class Any
@AutoConfiguration(value = _, before = _, beforeName = _, after = _, afterName = _) @Configuration(value = _, proxyBeanMethods = _, enforceUniqueMethods = _) @ConditionalOnClass(value = _, name = scala.Array.apply[java.lang.String]("org.llm4s.javaapi.Llm4s$")(scala.reflect.ClassTag.apply[java.lang.String](classOf[java.lang.String]))) @ConditionalOnProperty(value = _, prefix = "llm4s", name = scala.Array.apply[java.lang.String]("enabled")(scala.reflect.ClassTag.apply[java.lang.String](classOf[java.lang.String])), havingValue = "true", matchIfMissing = true) @EnableConfigurationProperties(value = scala.Array.apply[java.lang.Class[_ >: scala.Nothing <: . ]](scala.Predef.classOf[org.llm4s.spring.Llm4sProperties])(scala.reflect.ClassTag.apply[java.lang.Class[_ >: scala.Nothing <: . ]](classOf[java.lang.Class])))

Attributes

Supertypes
class Object
trait Matchable
class Any

Name of the executor bean behind completeAsync and the health probe; define a bean of this name to replace it.

Name of the executor bean behind completeAsync and the health probe; define a bean of this name to replace it.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
@ConfigurationProperties(value = _, prefix = "llm4s", ignoreInvalidFields = _, ignoreUnknownFields = _)

Attributes

Supertypes
class Object
trait Matchable
class Any
@AutoConfiguration(value = _, before = _, beforeName = _, after = scala.Array.apply[java.lang.Class[_ >: scala.Nothing <: . ]](scala.Predef.classOf[org.llm4s.spring.Llm4sAutoConfiguration])(scala.reflect.ClassTag.apply[java.lang.Class[_ >: scala.Nothing <: . ]](classOf[java.lang.Class])), afterName = _) @Configuration(value = _, proxyBeanMethods = _, enforceUniqueMethods = _) @ConditionalOnClass(value = _, name = scala.Array.apply[java.lang.String]("org.springframework.boot.actuate.health.HealthIndicator")(scala.reflect.ClassTag.apply[java.lang.String](classOf[java.lang.String]))) @ConditionalOnBean(value = scala.Array.apply[java.lang.Class[_ >: scala.Nothing <: . ]](scala.Predef.classOf[org.llm4s.javaapi.JLlmClient])(scala.reflect.ClassTag.apply[java.lang.Class[_ >: scala.Nothing <: . ]](classOf[java.lang.Class])), type = _, annotation = _, name = _, search = _, parameterizedContainer = _)

Attributes

Supertypes
class Object
trait Matchable
class Any
final class LlmHealthIndicator(client: JLlmClient, settings: HealthSettings, executor: ExecutorService, nanoClock: () => Long) extends HealthIndicator

Reports what was actually checked. By default (llm4s.health.probe=false) it makes no provider call: it is UP with probe=disabled and the provider and model names, meaning "configured", not "reachable". With llm4s.health.probe=true it sends a one-token completion on executor, waits at most llm4s.health.probe-timeout, and caches the outcome for llm4s.health.probe-ttl. A failed or timed-out probe is DOWN with a redacted message.

Reports what was actually checked. By default (llm4s.health.probe=false) it makes no provider call: it is UP with probe=disabled and the provider and model names, meaning "configured", not "reachable". With llm4s.health.probe=true it sends a one-token completion on executor, waits at most llm4s.health.probe-timeout, and caches the outcome for llm4s.health.probe-ttl. A failed or timed-out probe is DOWN with a redacted message.

Attributes

Supertypes
trait HealthIndicator
trait HealthContributor
class Object
trait Matchable
class Any

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type