final | |
|---|---|
readonly | |
implements |
Arrayable<array{text: string, type: 'text', annotations?: template-type<Annotations, Arrayable, 'T'>, _meta?: template-type<PayloadMetaObject, MetaObject, 'T'>}>, ContentBlock |
Text provided to or from an LLM.
| Methods | ||
|---|---|---|
public
|
__construct(
string $text,
Annotations $annotations = new Annotations(),
PayloadMetaObject $meta = new PayloadMetaObject(),
)
|
# |
public
static
|
fromArray(array $data): static
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): array
|
# |
| Constants | |||
|---|---|---|---|
public
|
string |
TYPE = 'text'
|
# |
| Properties | |||
|---|---|---|---|
public
|
string
|
$text
|
# |
public
|
Annotations
|
$annotations
|
# |
public
|
PayloadMetaObject
|
$meta
|
# |