The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
2.1.9
Prompt
Package: flyte.extras
Simple prompt record with built-in token estimation.
This is a convenience type for common LLM use cases. For richer
prompt types (e.g. with system messages, metadata), define your own
dataclass implementing TokenEstimator.
Parameters
class Prompt(
text: str,
)| Parameter | Type | Description |
|---|---|---|
text |
str |
The prompt text. |
Methods
| Method | Description |
|---|---|
estimate_tokens() |
Rough token estimate (~4 chars per token). |
estimate_tokens()
def estimate_tokens()Rough token estimate (~4 chars per token).