0.3.5 • Published 4 months ago

s1-zap-agents v0.3.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

S1-Agent

Install

bun add s1-zap-agents whatsapp-web.js
npm i s1-zap-agents whatsapp-web.js
yarn add s1-zap-agents whatsapp-web.js

Local Setup

Docker

docker build --build-arg OPENAI_API_KEY=$OPENAI_API_KEY \
             --build-arg AGENT_ID=<your_agent_id> \
             -t s1-zap-agent:latest .
docker run -it --rm s1-zap-agent:latest

Bun

bun i
bun run src/bin.ts

Usage Example

export const client = new Client({
  puppeteer: {
    args: ['--no-sandbox', '--disable-setuid-sandbox'],
    executablePath: process.env.CHROME_BIN,
    headless: true,
  },

  authStrategy: new LocalAuth(),
});

startAgent(client, {
  route: [
    {
      event: Events.MESSAGE_CREATE,
      handlers: [
        { handler: AudioHandler },
        {
          handler: SpeechHandler,
          opts: { command: '--to-audio', agent: new Agent(AgentEnum.audio) },
        },
        {
          handler: TracribeHandler,
          opts: { command: '--to-text', agent: new Agent(AgentEnum.audio) },
        },
        {
          handler: TextHandler,
          opts: { command: '/gpt', agent: new Agent(AgentEnum.raw) },
        },
      ],
    },
  ],
});
0.3.5

4 months ago

0.3.2

4 months ago

0.3.1

4 months ago

0.3.4

4 months ago

0.3.3

4 months ago

0.3.0

5 months ago

0.2.3

5 months ago

0.2.4

5 months ago

0.2.1

5 months ago

0.2.0

5 months ago

0.2.2

5 months ago

0.1.1

6 months ago

0.1.0

6 months ago

1.2.6

6 months ago