File tree Expand file tree Collapse file tree 3 files changed +30
-10
lines changed
typescript/effect-ai/src/prompt-caching Expand file tree Collapse file tree 3 files changed +30
-10
lines changed Original file line number Diff line number Diff 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 ( '' ) ;
Original file line number Diff line number Diff 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 ( '' ) ;
Original file line number Diff line number Diff 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 = ( ) =>
You can’t perform that action at this time.
0 commit comments