New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastapi-poe

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastapi-poe

Create PoeAI server bot with JavaScript and Cloudflare Workers.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
0
Weekly downloads
 
Created
Source

fastapi-poe

Create PoeAI server bot with JavaScript and Cloudflare Workers.

Bootstrap Project

pnpm dlx fastapi-poe@latest init <project-name>

Development

cd <project-name>
pnpm i
pnpm dev

Deployment

pnpm run deploy
echo <access-key> | pnpm wrangler secret put ACCESS_KEY

Basic Usage

import { poe } from 'fastapi-poe'

const bot = poe({
  name: 'custom-bot',
  // settings, https://creator.poe.com/docs/poe-protocol-specification#settings
  getSettings() {
    return {
      // declare other bots as dependencies
      server_bot_dependencies: {
        'Claude-3.5-Sonnet': 1,
      },
      allow_attachments: false,
      suggested_replies: true,
      enable_markdown: true,
    }
  },
  // get response from bot, https://creator.poe.com/docs/poe-protocol-specification#query
  async *getResponse(req) {
    // call other bots
    for await (const response of bot.streamRequest(req, 'Claude-3.5-Sonnet')) {
      yield {
        text: response.text,
      }
    }
  },
})

FAQs

Package last updated on 20 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc