ContentPart

org.llm4s.llmconnect.model.ContentPart
See theContentPart companion trait
object ContentPart

Attributes

Companion
trait
Source
ContentPart.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Document extends ContentPart

A document - a PDF, text, Markdown, HTML or CSV file; build one with ContentPart.document.

A document - a PDF, text, Markdown, HTML or CSV file; build one with ContentPart.document.

Attributes

Source
ContentPart.scala
Supertypes
trait ContentPart
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Image extends ContentPart

An image; build one with ContentPart.image.

An image; build one with ContentPart.image.

Attributes

Source
ContentPart.scala
Supertypes
trait ContentPart
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Text extends ContentPart

Text. A message whose every part is blank text is refused by Message.validate. A null text is read as empty when the part is built, so no code that reads a part - validation, a codec, a provider's encoder - has to guard against it.

Text. A message whose every part is blank text is refused by Message.validate. A null text is read as empty when the part is built, so no code that reads a part - validation, a codec, a provider's encoder - has to guard against it.

Attributes

Companion
object
Source
ContentPart.scala
Supertypes
trait ContentPart
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Text

Attributes

Companion
class
Source
ContentPart.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Text.type

Inherited and Abstract types

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
Source
Mirror.scala

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

A document from source, checked as described on ContentPart.

A document from source, checked as described on ContentPart.

Attributes

Source
ContentPart.scala
def image(source: MediaSource, mediaType: ImageMediaType): Result[Image]

An image from source, checked as described on ContentPart.

An image from source, checked as described on ContentPart.

Attributes

Source
ContentPart.scala

The number of inline bytes parts carry, in total.

The number of inline bytes parts carry, in total.

Attributes

Source
ContentPart.scala

Whether part is an image or a document.

Whether part is an image or a document.

Attributes

Source
ContentPart.scala
def text(parts: Seq[ContentPart]): String

The text parts of parts, joined by newlines: a message's text view. Empty when there are none.

The text parts of parts, joined by newlines: a message's text view. Empty when there are none.

Attributes

Source
ContentPart.scala

Concrete fields

The bound on an inline part's bytes: 5 MiB. One bound for every part, wherever it is built - a smart constructor or the codec reading stored or imported JSON - so no part over it can exist.

The bound on an inline part's bytes: 5 MiB. One bound for every part, wherever it is built - a smart constructor or the codec reading stored or imported JSON - so no part over it can exist.

Attributes

Source
ContentPart.scala

Implicits

Implicits

implicit val rw: ReadWriter[ContentPart]

Attributes

Source
ContentPart.scala