2.0.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`.
Attributes:
text: The prompt text.
Parameters
class Prompt(
text: str,
)| Parameter | Type | Description |
|---|---|---|
text |
str |
Methods
| Method | Description |
|---|---|
estimate_tokens() |
Rough token estimate (~4 chars per token). |
estimate_tokens()
def estimate_tokens()Rough token estimate (~4 chars per token).