Skip to content

Commit b9570b2

Browse files
fix: use generic LLMAgent instead of OpenAIAgent (adds support for Gemini and Anthropic for Agentic RAG) (#410)
1 parent 00009ae commit b9570b2

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/shy-bulldogs-wait.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-llama": patch
3+
---
4+
5+
Fix: use generic LLMAgent instead of OpenAIAgent (adds support for Gemini and Anthropic for Agentic RAG)

templates/components/engines/typescript/agent/chat.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
BaseChatEngine,
33
BaseToolWithCall,
4-
OpenAIAgent,
4+
LLMAgent,
55
QueryEngineTool,
66
} from "llamaindex";
77
import fs from "node:fs/promises";
@@ -42,7 +42,7 @@ export async function createChatEngine(documentIds?: string[], params?: any) {
4242
tools.push(...(await createTools(toolConfig)));
4343
}
4444

45-
const agent = new OpenAIAgent({
45+
const agent = new LLMAgent({
4646
tools,
4747
systemPrompt: process.env.SYSTEM_PROMPT,
4848
}) as unknown as BaseChatEngine;

0 commit comments

Comments
 (0)