mirror of https://github.com/buster-so/buster.git
switch system messages to leverage caching a bit better
This commit is contained in:
parent
8104ad33bf
commit
19f7256a27
|
@ -11,12 +11,9 @@ type MarkdownComponentProps = {
|
|||
children: React.ReactNode;
|
||||
className?: string;
|
||||
style?: React.CSSProperties;
|
||||
} & Pick<
|
||||
AnimatedMarkdownProps,
|
||||
'animation' | 'animationDuration' | 'animationTimingFunction'
|
||||
> & {
|
||||
isStreamFinished: boolean;
|
||||
};
|
||||
} & Pick<AnimatedMarkdownProps, 'animation' | 'animationDuration' | 'animationTimingFunction'> & {
|
||||
isStreamFinished: boolean;
|
||||
};
|
||||
|
||||
type NonAnimatedMarkdownComponentProps = Omit<
|
||||
MarkdownComponentProps,
|
||||
|
|
|
@ -59,7 +59,7 @@ const outputSchema = z.object({
|
|||
});
|
||||
|
||||
const DEFAULT_CACHE_OPTIONS = {
|
||||
anthropic: { cacheControl: { type: 'ephemeral' } },
|
||||
anthropic: { cacheControl: { type: 'ephemeral', ttl: '1hr' } },
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -383,12 +383,12 @@ ${databaseContext}
|
|||
const systemMessages: CoreMessage[] = [
|
||||
{
|
||||
role: 'system',
|
||||
content: createDatasetSystemMessage(assembledYmlContent),
|
||||
content: createAnalystInstructionsWithoutDatasets(sqlDialectGuidance),
|
||||
providerOptions: DEFAULT_CACHE_OPTIONS,
|
||||
},
|
||||
{
|
||||
role: 'system',
|
||||
content: createAnalystInstructionsWithoutDatasets(sqlDialectGuidance),
|
||||
content: createDatasetSystemMessage(assembledYmlContent),
|
||||
providerOptions: DEFAULT_CACHE_OPTIONS,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -254,12 +254,12 @@ ${databaseContext}
|
|||
const systemMessages: CoreMessage[] = [
|
||||
{
|
||||
role: 'system',
|
||||
content: createDatasetSystemMessage(assembledYmlContent),
|
||||
content: createThinkAndPrepInstructionsWithoutDatasets(sqlDialectGuidance),
|
||||
providerOptions: DEFAULT_CACHE_OPTIONS,
|
||||
},
|
||||
{
|
||||
role: 'system',
|
||||
content: createThinkAndPrepInstructionsWithoutDatasets(sqlDialectGuidance),
|
||||
content: createDatasetSystemMessage(assembledYmlContent),
|
||||
providerOptions: DEFAULT_CACHE_OPTIONS,
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue