Skip to Content

getAgent()

指定された構成に基づいてエージェントを取得する

async function getAgent({ connectionId, agent, apis, logger, }: { connectionId: string; agent: Record<string, any>; apis: Record<string, IntegrationApi>; logger: any; }): Promise<(props: { prompt: string }) => Promise<any>> { return async (props: { prompt: string }) => { return { message: "Hello, world!" }; }; }

API シグネチャ

パラメーター

connectionId:

string
エージェントのAPI呼び出しに使用する接続ID。

agent:

Record<string, any>
エージェントの設定オブジェクト。

apis:

Record<string, IntegrationAPI>
API名とそれぞれのAPIオブジェクトのマップ。

戻り値