org.llm4s.types

package org.llm4s.types

The Result type, its syntax, and the newtypes the library's own APIs use.

Attributes

Members list

Type members

Classlikes

final case class ArtifactKey(value: String) extends AnyVal

Type-safe wrapper for artifact store keys

Type-safe wrapper for artifact store keys

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final case class ContentSize(bytes: Long) extends AnyVal

Type-safe wrapper for content size in bytes with validation

Type-safe wrapper for content size in bytes with validation

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final case class DirectoryPath(value: String) extends AnyVal

Type-safe wrapper for directory paths

Type-safe wrapper for directory paths

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
case class ExternalizedContent(key: ArtifactKey, originalSize: ByteCount, contentType: String, summary: String)

Information about externalized content

Information about externalized content

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class FilePath(value: String) extends AnyVal

Type-safe wrapper for file paths

Type-safe wrapper for file paths

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
FilePath.type
final implicit class FutureOps[A](val fa: Future[A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
final case class HeadroomPercent(value: Double) extends AnyVal

Type-safe wrapper for headroom percentage with validation

Type-safe wrapper for headroom percentage with validation

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final implicit class OptionOps[A](val oa: Option[A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
@Stable

Type-safe identifier types for the multi-provider configuration system.

Type-safe identifier types for the multi-provider configuration system.

Each identifier is an opaque type over String, giving distinct compile-time types to values that are otherwise interchangeable raw strings. This makes it a compile error to pass, for example, an ApiKey where a ModelName is expected, at zero runtime cost.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
final case class SemanticBlockId(value: String) extends AnyVal

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final case class SessionId(value: String) extends AnyVal

Type-safe wrapper for session IDs

Type-safe wrapper for session IDs

Attributes

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

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
SessionId.type
final case class TraceId(value: String) extends AnyVal

Type-safe wrapper for trace IDs for distributed tracing

Type-safe wrapper for trace IDs for distributed tracing

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all
final implicit class TryOps[A](val t: Try[A]) extends AnyVal

Syntax: Try/Option/Future to Result conversions

Syntax: Try/Option/Future to Result conversions

Attributes

Supertypes
class AnyVal
trait Matchable
class Any

Types

type AsyncResult[+A] = Future[Result[A]]

Async result type for Future-based operations

Async result type for Future-based operations

Attributes

type ByteCount = Long

Type alias for byte count

Type alias for byte count

Attributes

type ContextWindowSize = Int

Type alias for context window size in semantic blocks

Type alias for context window size in semantic blocks

Attributes

Type alias for externalization threshold in bytes

Type alias for externalization threshold in bytes

Attributes

type Result[+A] = Either[LLMError, A]

Standard synchronous result type used throughout the library

Standard synchronous result type used throughout the library

Attributes

type TokenBudget = Int

Type alias for token budget

Type alias for token budget

Attributes

Implicits

Implicits

final implicit def FutureOps[A](fa: Future[A]): FutureOps[A]
final implicit def OptionOps[A](oa: Option[A]): OptionOps[A]
final implicit def TryOps[A](t: Try[A]): TryOps[A]

Syntax: Try/Option/Future to Result conversions

Syntax: Try/Option/Future to Result conversions

Attributes