feat(backend): fix type errors
This commit is contained in:
parent
f4b58c7157
commit
3ffb20b777
|
@ -47,7 +47,7 @@ const generateSuggestions = (
|
||||||
input: SuggestionGeneratorInput,
|
input: SuggestionGeneratorInput,
|
||||||
llm: BaseChatModel,
|
llm: BaseChatModel,
|
||||||
) => {
|
) => {
|
||||||
(llm as ChatOpenAI).temperature = 0;
|
(llm as unknown as ChatOpenAI).temperature = 0;
|
||||||
const suggestionGeneratorChain = createSuggestionGeneratorChain(llm);
|
const suggestionGeneratorChain = createSuggestionGeneratorChain(llm);
|
||||||
return suggestionGeneratorChain.invoke(input);
|
return suggestionGeneratorChain.invoke(input);
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const handleConnection = async (
|
||||||
chatModelProviders[chatModelProvider][chatModel] &&
|
chatModelProviders[chatModelProvider][chatModel] &&
|
||||||
chatModelProvider != 'custom_openai'
|
chatModelProvider != 'custom_openai'
|
||||||
) {
|
) {
|
||||||
llm = chatModelProviders[chatModelProvider][chatModel] as
|
llm = chatModelProviders[chatModelProvider][chatModel] as unknown as
|
||||||
| BaseChatModel
|
| BaseChatModel
|
||||||
| undefined;
|
| undefined;
|
||||||
} else if (chatModelProvider == 'custom_openai') {
|
} else if (chatModelProvider == 'custom_openai') {
|
||||||
|
@ -56,7 +56,7 @@ export const handleConnection = async (
|
||||||
configuration: {
|
configuration: {
|
||||||
baseURL: searchParams.get('openAIBaseURL'),
|
baseURL: searchParams.get('openAIBaseURL'),
|
||||||
},
|
},
|
||||||
});
|
}) as unknown as BaseChatModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
Loading…
Reference in New Issue