본문으로 건너뛰기

Class: BaseAgent

BaseAgent is the base class for all agents.

Implements

  • BaseChatEngine
  • BaseQueryEngine

Constructors

constructor

new BaseAgent(): BaseAgent

Returns

BaseAgent

Methods

_getPromptModules

_getPromptModules(): string[]

Returns

string[]

Defined in

packages/core/src/agent/types.ts:44


_getPrompts

_getPrompts(): string[]

Returns

string[]

Defined in

packages/core/src/agent/types.ts:40


chat

chat(params): Promise<AgentChatResponse | StreamingAgentChatResponse>

Parameters

NameType
paramsChatEngineAgentParams

Returns

Promise<AgentChatResponse | StreamingAgentChatResponse>

Implementation of

BaseChatEngine.chat

Defined in

packages/core/src/agent/types.ts:48


query

query(params): Promise<AgentChatResponse | StreamingAgentChatResponse>

query is the main entrypoint for the agent. It takes a query and returns a response.

Parameters

NameType
paramsQueryEngineParamsNonStreaming

Returns

Promise<AgentChatResponse | StreamingAgentChatResponse>

Implementation of

BaseQueryEngine.query

Defined in

packages/core/src/agent/types.ts:59


reset

reset(): void

Returns

void

Defined in

packages/core/src/agent/types.ts:52