feat(agents): replace LLMs with chat LLMs

This commit is contained in:
ItzCrazyKns
2024-04-18 18:15:17 +05:30
parent f9ab543bcf
commit dd1ce4e324
7 changed files with 19 additions and 44 deletions

View File

@@ -9,7 +9,7 @@ import { StringOutputParser } from '@langchain/core/output_parsers';
import type { StreamEvent } from '@langchain/core/tracers/log_stream';
import eventEmitter from 'events';
const chatLLM = new ChatOpenAI({
const llm = new ChatOpenAI({
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});
@@ -50,7 +50,7 @@ const writingAssistantChain = RunnableSequence.from([
new MessagesPlaceholder('chat_history'),
['user', '{query}'],
]),
chatLLM,
llm,
strParser,
]).withConfig({
runName: 'FinalResponseGenerator',