Are you an LLM? You can read better optimized documentation at /api/@nhtio/adk/batteries/llm/anthropic_messages/helpers/variables/defaultRenderAnthropicSegmentedSystemPrompt.md for this page in Markdown format
Variable: defaultRenderAnthropicSegmentedSystemPrompt
ts
const defaultRenderAnthropicSegmentedSystemPrompt: (input: {
bucketOrder: ChatCompletionsBucketOrder;
cacheBreakpoints: AnthropicCacheBreakpoints;
cacheTtl?: "5m" | "1h";
memories: Iterable<Memory>;
renderCtx?: unknown;
renderFirstPartyRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
) => Promise<string>;
renderMemories: (
items: Iterable<{
attrs: MemoryAttrs;
memory: Memory;
}>,
) => string;
renderRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
deps: {
renderFirstPartyRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
) => Promise<string>;
renderRetrievableSafetyDirective: () => string;
renderThirdPartyPrivateRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
deps: {
renderUntrustedContent: (
content: string,
attrs: UntrustedContentAttrs,
) => string;
},
) => Promise<string>;
renderThirdPartyPublicRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
deps: {
renderUntrustedContent: (
content: string,
attrs: UntrustedContentAttrs,
) => string;
},
) => Promise<string>;
renderUntrustedContent: (
content: string,
attrs: UntrustedContentAttrs,
) => string;
},
) => Promise<string>;
renderRetrievableSafetyDirective: () => string;
renderStandingInstructions: (
items: Iterable<Tokenizable>,
attrs?: StandingInstructionAttrs,
) => string;
renderThirdPartyPrivateRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
deps: {
renderUntrustedContent: (
content: string,
attrs: UntrustedContentAttrs,
) => string;
},
) => Promise<string>;
renderThirdPartyPublicRetrievables: (
items: Iterable<{
attrs: RetrievableAttrs;
retrievable: Retrievable;
}>,
deps: {
renderUntrustedContent: (
content: string,
attrs: UntrustedContentAttrs,
) => string;
},
) => Promise<string>;
renderUntrustedContent: (
content: string,
attrs: UntrustedContentAttrs,
) => string;
retrievables: Iterable<Retrievable>;
standingInstructions: Iterable<Tokenizable>;
systemPrompt: Tokenizable;
warn?: (msg: string) => void;
}) => Promise<TextBlockParam[]> = renderAnthropicSegmentedSystemPrompt;Defined in: src/batteries/llm/anthropic_messages/helpers.ts:370
Default segmented system renderer.
Renders system buckets as separate text blocks and places up to three cache breakpoints.
Parameters
| Parameter | Type |
|---|---|
input | { bucketOrder: ChatCompletionsBucketOrder; cacheBreakpoints: AnthropicCacheBreakpoints; cacheTtl?: "5m" | "1h"; memories: Iterable<Memory>; renderCtx?: unknown; renderFirstPartyRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>) => Promise<string>; renderMemories: (items: Iterable<{ attrs: MemoryAttrs; memory: Memory; }>) => string; renderRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderFirstPartyRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>) => Promise<string>; renderRetrievableSafetyDirective: () => string; renderThirdPartyPrivateRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderThirdPartyPublicRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderRetrievableSafetyDirective: () => string; renderStandingInstructions: (items: Iterable<Tokenizable>, attrs?: StandingInstructionAttrs) => string; renderThirdPartyPrivateRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderThirdPartyPublicRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; retrievables: Iterable<Retrievable>; standingInstructions: Iterable<Tokenizable>; systemPrompt: Tokenizable; warn?: (msg: string) => void; } |
input.bucketOrder | ChatCompletionsBucketOrder |
input.cacheBreakpoints | AnthropicCacheBreakpoints |
input.cacheTtl? | "5m" | "1h" |
input.memories | Iterable<Memory> |
input.renderCtx? | unknown |
input.renderFirstPartyRetrievables | (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>) => Promise<string> |
input.renderMemories | (items: Iterable<{ attrs: MemoryAttrs; memory: Memory; }>) => string |
input.renderRetrievables | (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderFirstPartyRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>) => Promise<string>; renderRetrievableSafetyDirective: () => string; renderThirdPartyPrivateRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderThirdPartyPublicRetrievables: (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string>; renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string> |
input.renderRetrievableSafetyDirective | () => string |
input.renderStandingInstructions | (items: Iterable<Tokenizable>, attrs?: StandingInstructionAttrs) => string |
input.renderThirdPartyPrivateRetrievables | (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string> |
input.renderThirdPartyPublicRetrievables | (items: Iterable<{ attrs: RetrievableAttrs; retrievable: Retrievable; }>, deps: { renderUntrustedContent: (content: string, attrs: UntrustedContentAttrs) => string; }) => Promise<string> |
input.renderUntrustedContent | (content: string, attrs: UntrustedContentAttrs) => string |
input.retrievables | Iterable<Retrievable> |
input.standingInstructions | Iterable<Tokenizable> |
input.systemPrompt | Tokenizable |
input.warn? | (msg: string) => void |
Returns
Promise<TextBlockParam[]>