From 64683a55f3c0d5aa5b98b1b060fbf7fef5e8472f Mon Sep 17 00:00:00 2001 From: Emanuel Ferreira Date: Fri, 1 Mar 2024 21:45:02 -0300 Subject: [PATCH] fix: prefix messages always true (#596) --- .changeset/eighty-ducks-beam.md | 5 +++++ packages/core/src/agent/openai/base.ts | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/eighty-ducks-beam.md diff --git a/.changeset/eighty-ducks-beam.md b/.changeset/eighty-ducks-beam.md new file mode 100644 index 0000000000..dd960be1e2 --- /dev/null +++ b/.changeset/eighty-ducks-beam.md @@ -0,0 +1,5 @@ +--- +"llamaindex": patch +--- + +fix: prefix messages always true diff --git a/packages/core/src/agent/openai/base.ts b/packages/core/src/agent/openai/base.ts index ff29ed31ed..3374c2a048 100644 --- a/packages/core/src/agent/openai/base.ts +++ b/packages/core/src/agent/openai/base.ts @@ -37,8 +37,6 @@ export class OpenAIAgent extends AgentRunner { toolRetriever, systemPrompt, }: OpenAIAgentParams) { - prefixMessages = prefixMessages || []; - llm = llm ?? new OpenAI({ model: "gpt-3.5-turbo-0613" }); if (systemPrompt) {