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