File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ const parseActionItems = (text: string) => {
5454 . filter ( isNotNull ) ;
5555} ;
5656
57- const getChatModel = async ( ) => {
57+ export const getChatModel = async ( ) => {
5858 const { llm } = await settings . getSettings ( ) ;
5959 switch ( llm . provider ) {
6060 case "ollama" :
@@ -68,7 +68,7 @@ const getChatModel = async () => {
6868 }
6969} ;
7070
71- const getEmbeddings = async ( ) => {
71+ export const getEmbeddings = async ( ) => {
7272 const { llm } = await settings . getSettings ( ) ;
7373
7474 switch ( llm . provider ) {
@@ -77,8 +77,8 @@ const getEmbeddings = async () => {
7777 return new OllamaEmbeddings ( llm . providerConfig . ollama . embeddings ) ;
7878 case "openai" :
7979 return new OpenAIEmbeddings ( {
80+ ...llm . providerConfig . openai . chatModel , // reuse provider config
8081 ...llm . providerConfig . openai . embeddings ,
81- apiKey : llm . providerConfig . openai . chatModel . apiKey ,
8282 } ) ;
8383 default :
8484 throw new Error ( `Invalid LLM provider: ${ llm . provider } ` ) ;
You can’t perform that action at this time.
0 commit comments