@@ -6,12 +6,12 @@ import {
66 assertLessOrEqual ,
77 assertStringIncludes ,
88 assertThrows ,
9- } from ' jsr:@std/assert' ;
9+ } from " jsr:@std/assert" ;
1010
11- const session = new Supabase . ai . Session ( ' gte-small' ) ;
11+ const session = new Supabase . ai . Session ( " gte-small" ) ;
1212
1313assertThrows ( ( ) => {
14- const _ = new Supabase . ai . Session ( ' gte-small_wrong_name' ) ;
14+ const _ = new Supabase . ai . Session ( " gte-small_wrong_name" ) ;
1515} , "invalid 'Session' type" ) ;
1616
1717function dotProduct ( a : number [ ] , b : number [ ] ) {
@@ -27,14 +27,13 @@ export default {
2727 async fetch ( ) {
2828 // Generate embedding
2929 // @ts -ignore unkwnow type
30- const [ meow , meowError ] = await session . run ( ' meow' ) as [
30+ const [ meow , meowError ] = await session . run ( " meow" ) as [
3131 number [ ] ,
3232 undefined ,
3333 ] ;
34- console . log ( 'cat' , meow , meowError ) ;
3534
3635 // @ts -ignore unkwnow type
37- const [ love , loveError ] = await session . run ( ' I love cats' , {
36+ const [ love , loveError ] = await session . run ( " I love cats" , {
3837 mean_pool : true ,
3938 normalize : true ,
4039 } ) as [ number [ ] , undefined ] ;
@@ -51,7 +50,7 @@ export default {
5150 // "Invalid input should result in error value"
5251 {
5352 const [ notCat , notCatError ] = await session . run ( {
54- bad_input : { ' not a cat' : ' let fail' } ,
53+ bad_input : { " not a cat" : " let fail" } ,
5554 } ) as [ undefined , { message : string ; inner : Error } ] ;
5655
5756 assertEquals ( notCat , undefined ) ;
@@ -60,7 +59,7 @@ export default {
6059 assertIsError ( notCatError . inner ) ;
6160 assertStringIncludes (
6261 notCatError . message ,
63- ' must provide a valid prompt value' ,
62+ " must provide a valid prompt value" ,
6463 ) ;
6564 }
6665
0 commit comments