0.1.479 • Published 3 months ago

@wrtnlabs/connector-notion v0.1.479

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

@wrtnlabs/connector-notion

By installing the package, you can use functions for Notion.

How to Use

Setup

install the packages related with @agentica/core

npm install @agentica/core @samchon/openapi typia
npx typia setup

install the @wrtnlabs/connector-notion package.

npm install @wrtnlabs/connector-notion

Usage

import { NotionService } from "@wrtnlabs/connector-notion";

async function main() {
  const agent = new Agentica({
    model: "chatgpt",
    vendor: {
      api: openai,
      model: "gpt-4o-mini",
    },
    controllers: [
      {
        name: "Notion Connector",
        protocol: "class",
        application: typia.llm.application<NotionService, "chatgpt">(),
        execute: new NotionService(),
      },
    ],
  });

  await agent.conversate("What you can do?");
}

main().catch(console.error);

Define the LLM model to be used through new OpenAI() and create an agent to allow tool calls by injecting the OpenAI class into new Agentica(). And you can define the tool to use by entering Connector package(tool) in the controllers part of the creator. At this time, the protocol must be set to "class" and the methods of the class must be set to "class" so that the methods of the class can be executed through utterance with LLM. typia.llm.applicationOfValidate<NotionService, "chatgpt">() converts the methods implemented in class in Typescript compilation time into openai function scheme.

0.1.479

3 months ago

0.1.478

3 months ago

0.1.473

3 months ago

0.1.472

3 months ago

0.1.475

3 months ago

0.1.474

3 months ago

0.1.471

4 months ago

0.1.470

4 months ago

0.1.469

4 months ago

0.1.468

4 months ago

0.1.467

4 months ago