@@ -801,6 +801,45 @@ describe('Unit testing of the vectorizer factory class', () => {
801801 } ) ;
802802 } ) ;
803803
804+ it ( 'should create the correct Text2VecOctoAIConfig type with defaults' , ( ) => {
805+ const config = configure . vectorizer . text2VecOctoAI ( ) ;
806+ expect ( config ) . toEqual < VectorConfigCreate < never , undefined , 'hnsw' , 'text2vec-octoai' > > ( {
807+ name : undefined ,
808+ vectorIndex : {
809+ name : 'hnsw' ,
810+ config : undefined ,
811+ } ,
812+ vectorizer : {
813+ name : 'text2vec-octoai' ,
814+ config : undefined ,
815+ } ,
816+ } ) ;
817+ } ) ;
818+
819+ it ( 'should create the correct Text2VecOctoAIConfig type with all values' , ( ) => {
820+ const config = configure . vectorizer . text2VecOctoAI ( {
821+ name : 'test' ,
822+ baseURL : 'base-url' ,
823+ model : 'model' ,
824+ vectorizeCollectionName : true ,
825+ } ) ;
826+ expect ( config ) . toEqual < VectorConfigCreate < never , 'test' , 'hnsw' , 'text2vec-octoai' > > ( {
827+ name : 'test' ,
828+ vectorIndex : {
829+ name : 'hnsw' ,
830+ config : undefined ,
831+ } ,
832+ vectorizer : {
833+ name : 'text2vec-octoai' ,
834+ config : {
835+ baseURL : 'base-url' ,
836+ model : 'model' ,
837+ vectorizeCollectionName : true ,
838+ } ,
839+ } ,
840+ } ) ;
841+ } ) ;
842+
804843 it ( 'should create the correct Text2VecOllamaConfig type with defaults' , ( ) => {
805844 const config = configure . vectorizer . text2VecOllama ( ) ;
806845 expect ( config ) . toEqual < VectorConfigCreate < never , undefined , 'hnsw' , 'text2vec-ollama' > > ( {
@@ -1235,14 +1274,10 @@ describe('Unit testing of the generative factory class', () => {
12351274 } ) ;
12361275
12371276 it ( 'should create the correct GenerativePaLMConfig type with required & default values' , ( ) => {
1238- const config = configure . generative . palm ( {
1239- projectId : 'project-id' ,
1240- } ) ;
1241- expect ( config ) . toEqual < ModuleConfig < 'generative-palm' , GenerativePaLMConfig > > ( {
1277+ const config = configure . generative . palm ( ) ;
1278+ expect ( config ) . toEqual < ModuleConfig < 'generative-palm' , undefined > > ( {
12421279 name : 'generative-palm' ,
1243- config : {
1244- projectId : 'project-id' ,
1245- } ,
1280+ config : undefined ,
12461281 } ) ;
12471282 } ) ;
12481283
0 commit comments