Expand description
§entelix-prompt
Prompt primitives — PromptTemplate, ChatPromptTemplate,
MessagesPlaceholder, FewShotPromptTemplate,
ChatFewShotPromptTemplate, ExampleSelector. All implement
Runnable so they compose with codecs, parsers, tools and graphs
through .pipe().
Surface: PromptTemplate, ChatPromptTemplate,
ChatPromptPart, MessagesPlaceholder, PromptValue, PromptVars,
FewShotPromptTemplate, ChatFewShotPromptTemplate,
ExampleSelector + FixedExampleSelector +
LengthBasedExampleSelector.
Structs§
- Chat
FewShot Prompt Template - Chat-shape few-shot prompt.
- Chat
Prompt Template - Heterogeneous list of templated messages and placeholders. Renders to
Vec<Message>— the input type expected byentelix_core::ChatModel. - FewShot
Prompt Template - String-shape few-shot prompt.
- Fixed
Example Selector - Returns the configured examples verbatim, regardless of input.
- Length
Based Example Selector - Selector that caps the rendered example total at a character budget.
- Messages
Placeholder - Placeholder whose value at render time is a
Vec<Message>(typically chat history). - Prompt
Template - A Jinja2-syntax template that renders to
Stringfrom a variables map.
Enums§
- Chat
Prompt Part - One slot in a
ChatPromptTemplate: either a templated message (role + text template) or a placeholder for aVec<Message>variable. - Prompt
Value - A variable’s value: either text (for templated parts) or a list of messages (for placeholders).
Traits§
- Example
Selector - Strategy that picks which examples to inject into a few-shot prompt.
Type Aliases§
- Example
- One few-shot example: a map of example-prompt variable name → value.
- Prompt
Vars - Map of variable name → value, accepted by
ChatPromptTemplate::renderand theRunnableimpl. - Shared
Example Selector - Convenience type-alias for selectors handed around as trait objects.