55 GoogleGenerativeAI ,
66} from "@google/generative-ai" ;
77import { BaseLLM } from "../base" ;
8- import { GeminiModelResponse , ILlmConfig } from "../interface" ;
8+ import { GeminiModelResponseType , ILlmConfig } from "../interface" ;
99
10- export class GeminiLLM extends BaseLLM < GeminiModelResponse > {
10+ export class GeminiLLM extends BaseLLM < GeminiModelResponseType > {
1111 private readonly generativeAi : GoogleGenerativeAI ;
1212 private response : EmbedContentResponse | GenerateContentResult | undefined ;
1313
@@ -44,11 +44,10 @@ export class GeminiLLM extends BaseLLM<GeminiModelResponse> {
4444
4545 private getModel ( ) : GenerativeModel {
4646 try {
47- const model : GenerativeModel | undefined =
48- this . generativeAi . getGenerativeModel ( {
49- model : this . config . model ,
50- tools : this . config . tools ,
51- } ) ;
47+ const model : GenerativeModel | undefined = this . generativeAi . getGenerativeModel ( {
48+ model : this . config . model ,
49+ tools : this . config . tools ,
50+ } ) ;
5251 if ( ! model ) {
5352 throw new Error ( `Error retrieving model ${ this . config . model } ` ) ;
5453 }
@@ -59,7 +58,7 @@ export class GeminiLLM extends BaseLLM<GeminiModelResponse> {
5958 }
6059 }
6160
62- public createSnapShot ( data ?: any ) : GeminiModelResponse {
61+ public createSnapShot ( data ?: any ) : GeminiModelResponseType {
6362 return { ...this . response , ...data } ;
6463 }
6564
0 commit comments