Skip to content

Commit 8be9cfa

Browse files
Run biome format
1 parent 5e9b801 commit 8be9cfa

File tree

3 files changed

+30
-10
lines changed

3 files changed

+30
-10
lines changed

typescript/effect-ai/src/prompt-caching/multi-message-cache.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ const program = Effect.gen(function* () {
2222
const testId = Date.now();
2323
const largeContext = `Test ${testId}: Context:\n\n${LARGE_SYSTEM_PROMPT}`;
2424

25-
yield* Console.log('╔════════════════════════════════════════════════════════════════════════════╗');
26-
yield* Console.log('║ Anthropic Prompt Caching - Multi-Message (Effect AI) ║');
27-
yield* Console.log('╚════════════════════════════════════════════════════════════════════════════╝');
25+
yield* Console.log(
26+
'╔════════════════════════════════════════════════════════════════════════════╗',
27+
);
28+
yield* Console.log(
29+
'║ Anthropic Prompt Caching - Multi-Message (Effect AI) ║',
30+
);
31+
yield* Console.log(
32+
'╚════════════════════════════════════════════════════════════════════════════╝',
33+
);
2834
yield* Console.log('');
2935
yield* Console.log('Testing cache_control in multi-turn conversation');
3036
yield* Console.log('');

typescript/effect-ai/src/prompt-caching/no-cache-control.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ const program = Effect.gen(function* () {
2222
const testId = Date.now();
2323
const largeContext = `Test ${testId}: Context:\n\n${LARGE_SYSTEM_PROMPT}`;
2424

25-
yield* Console.log('╔════════════════════════════════════════════════════════════════════════════╗');
26-
yield* Console.log('║ Anthropic Prompt Caching - Control (No cache_control) (Effect AI) ║');
27-
yield* Console.log('╚════════════════════════════════════════════════════════════════════════════╝');
25+
yield* Console.log(
26+
'╔════════════════════════════════════════════════════════════════════════════╗',
27+
);
28+
yield* Console.log(
29+
'║ Anthropic Prompt Caching - Control (No cache_control) (Effect AI) ║',
30+
);
31+
yield* Console.log(
32+
'╚════════════════════════════════════════════════════════════════════════════╝',
33+
);
2834
yield* Console.log('');
2935
yield* Console.log('Testing WITHOUT cache_control (control scenario)');
3036
yield* Console.log('');

typescript/effect-ai/src/prompt-caching/user-message-cache.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,20 @@ const program = Effect.gen(function* () {
3232
const testId = Date.now();
3333
const largeContext = `Test ${testId}: Here is a comprehensive codebase to analyze:\n\n${LARGE_SYSTEM_PROMPT}`;
3434

35-
yield* Console.log('╔════════════════════════════════════════════════════════════════════════════╗');
36-
yield* Console.log('║ Anthropic Prompt Caching - User Message (Effect AI) ║');
37-
yield* Console.log('╚════════════════════════════════════════════════════════════════════════════╝');
35+
yield* Console.log(
36+
'╔════════════════════════════════════════════════════════════════════════════╗',
37+
);
38+
yield* Console.log(
39+
'║ Anthropic Prompt Caching - User Message (Effect AI) ║',
40+
);
41+
yield* Console.log(
42+
'╚════════════════════════════════════════════════════════════════════════════╝',
43+
);
3844
yield* Console.log('');
3945
yield* Console.log('Testing cache_control on user message content block');
40-
yield* Console.log(`Context size: ${largeContext.length} characters (~${Math.round(largeContext.length / 4)} tokens)`);
46+
yield* Console.log(
47+
`Context size: ${largeContext.length} characters (~${Math.round(largeContext.length / 4)} tokens)`,
48+
);
4149
yield* Console.log('');
4250

4351
const makePrompt = () =>

0 commit comments

Comments
 (0)