File tree 3 files changed +21
-3
lines changed
3 files changed +21
-3
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,22 @@ const LLMS: {
354
354
stream_available : true ,
355
355
model_provider : "OpenAI" ,
356
356
config : "{}" ,
357
+ } ,
358
+ {
359
+ model_id : "gemini-1.5-flash-dbase" ,
360
+ name : "Gemini 1.5 Flash (Google)" ,
361
+ model_type : "chat" ,
362
+ stream_available : true ,
363
+ model_provider : "Google" ,
364
+ config : "{}" ,
365
+ } ,
366
+ {
367
+ model_id : "gemini-1.5-pro-dbase" ,
368
+ name : "Gemini 1.5 Pro (Google)" ,
369
+ model_type : "chat" ,
370
+ stream_available : true ,
371
+ model_provider : "Google" ,
372
+ config : "{}" ,
357
373
}
358
374
] ;
359
375
Original file line number Diff line number Diff line change 1
1
import { BaseLanguageModel } from "@langchain/core/language_models/base" ;
2
+ import { BaseChatModel } from "@langchain/core/language_models/chat_models" ;
2
3
import { Document } from "@langchain/core/documents" ;
3
4
import {
4
5
ChatPromptTemplate ,
@@ -14,6 +15,7 @@ import {
14
15
RunnableMap ,
15
16
RunnableSequence ,
16
17
} from "@langchain/core/runnables" ;
18
+
17
19
type RetrievalChainInput = {
18
20
chat_history : string ;
19
21
question : string ;
@@ -107,8 +109,8 @@ export const createChain = ({
107
109
retriever,
108
110
response_template,
109
111
} : {
110
- llm : BaseLanguageModel ;
111
- question_llm : BaseLanguageModel ;
112
+ llm : BaseLanguageModel < any > | BaseChatModel < any > ;
113
+ question_llm : BaseLanguageModel < any > | BaseChatModel < any > ;
112
114
retriever : Runnable ;
113
115
question_template : string ;
114
116
response_template : string ;
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export const chatModelProvider = (
84
84
maxOutputTokens : 2048 ,
85
85
apiKey : process . env . GOOGLE_API_KEY ,
86
86
...otherFields ,
87
- } ) ;
87
+ } ) as any
88
88
case "ollama" :
89
89
return new ChatOllama ( {
90
90
baseUrl : otherFields . baseURL ,
You can’t perform that action at this time.
0 commit comments