feat(agents): Use LLM name from env

This commit is contained in:
ItzCrazyKns 2024-04-16 21:05:57 +05:30
parent 3859e3db03
commit 4ab8d6c834
No known key found for this signature in database
GPG Key ID: 8162927C7CCE3065
8 changed files with 14 additions and 13 deletions

View File

@ -2,3 +2,4 @@ PORT=3001
OPENAI_API_KEY=
SIMILARITY_MEASURE=cosine # cosine or dot
SEARXNG_API_URL= # no need to fill this if using docker
MODEL_NAME=gpt-3.5-turbo

View File

@ -19,13 +19,13 @@ import eventEmitter from 'events';
import computeSimilarity from '../utils/computeSimilarity';
const chatLLM = new ChatOpenAI({
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});
const llm = new OpenAI({
temperature: 0,
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
});
const embeddings = new OpenAIEmbeddings({

View File

@ -12,7 +12,7 @@ import { searchSearxng } from '../core/searxng';
const llm = new OpenAI({
temperature: 0,
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
});
const imageSearchChainPrompt = `

View File

@ -19,13 +19,13 @@ import eventEmitter from 'events';
import computeSimilarity from '../utils/computeSimilarity';
const chatLLM = new ChatOpenAI({
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});
const llm = new OpenAI({
temperature: 0,
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
});
const embeddings = new OpenAIEmbeddings({

View File

@ -19,13 +19,13 @@ import eventEmitter from 'events';
import computeSimilarity from '../utils/computeSimilarity';
const chatLLM = new ChatOpenAI({
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});
const llm = new OpenAI({
temperature: 0,
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
});
const embeddings = new OpenAIEmbeddings({

View File

@ -19,13 +19,13 @@ import eventEmitter from 'events';
import computeSimilarity from '../utils/computeSimilarity';
const chatLLM = new ChatOpenAI({
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});
const llm = new OpenAI({
temperature: 0,
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
});
const embeddings = new OpenAIEmbeddings({

View File

@ -10,7 +10,7 @@ import type { StreamEvent } from '@langchain/core/tracers/log_stream';
import eventEmitter from 'events';
const chatLLM = new ChatOpenAI({
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});

View File

@ -19,13 +19,13 @@ import eventEmitter from 'events';
import computeSimilarity from '../utils/computeSimilarity';
const chatLLM = new ChatOpenAI({
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
temperature: 0.7,
});
const llm = new OpenAI({
temperature: 0,
modelName: 'gpt-3.5-turbo',
modelName: process.env.MODEL_NAME,
});
const embeddings = new OpenAIEmbeddings({