final | |
|---|---|
readonly | |
implements |
JsonSerializable, Arrayable<array{_meta?: array<string, mixed>, type: 'text', text: string, annotations?: template-type<Annotations, Arrayable, 'T'>}>, ContentBlock |
Text provided to or from an LLM.
| Methods | ||
|---|---|---|
public
|
__construct(string $text, null|Annotations $annotations = null, null|array<string, mixed> $meta = null)
|
# |
public
|
toArray(): array
|
# |
public
|
jsonSerialize(): template-type<self, Arrayable, 'T'>
|
# |
| Properties | |||
|---|---|---|---|
public
|
non-empty-string
|
$type
|
# |
public
|
string
|
$text
|
# |
public
|
null|Annotations
|
$annotations
|
# |
public
|
null|array<string, mixed>
|
$meta
|
# |