Variable: defaultRenderChatCompletionsSystemPrompt
ts
const defaultRenderChatCompletionsSystemPrompt: (input: {
bucketOrder: ChatCompletionsBucketOrder;
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;
}) => Promise<string> = renderChatCompletionsSystemPrompt;Defined in: src/batteries/llm/chat_common/helpers.ts:817
Default system-prompt renderer; alias of renderChatCompletionsSystemPrompt.
Implements ChatHelpersCommon.renderChatCompletionsSystemPrompt.
Parameters
| Parameter | Type | Description |
|---|---|---|
input | { bucketOrder: ChatCompletionsBucketOrder; 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; } | - |
input.bucketOrder | ChatCompletionsBucketOrder | - |
input.memories | Iterable<Memory> | - |
input.renderCtx? | unknown | Live dispatch context for resolving a DYNAMIC Tokenizable systemPrompt via .render(ctx). Optional; a static systemPrompt ignores it. (standingInstructions/memories render through their own sub-helpers and remain static-string reads — the flagship's only dynamic content is a thought.) |
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 | - |
Returns
Promise<string>