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

polyfact

Package Overview
Dependencies
Maintainers
3
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polyfact

🏭 PolyFact

  • 0.1.35
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-94.44%
Maintainers
3
Weekly downloads
 
Created
Source

🏭 PolyFact

Documentation | Awesome list | Discord

⚡ A lightweight and simple way to create tools using AI 🪶

PolyFact's goal is to make it possible to code every AI tool/Chatbot you could want in only a couple of lines of code without the need for complex abstractions and having to deploy anything.

✨ Features

  • Generate: Answer to simple requests as text
  • Chat: Easily create chatbots
  • Transcribe: Transcribe audio files to text
  • Memory: Easily create a long-term memory and simplify the use of large amounts of information
  • Type checked generation: Answer simple requests with a type you defined (🎲 probabilistic function)

📚 Documentation

You can consult PolyFact's documentation at https://github.com/polyfact/polyfact-node/wiki

🚀 Getting started

To install polyfact into your repository:

npm install polyfact

Get your polyfact token by signing up with GitHub here: https://app.polyfact.com
Add your PolyFact Token in the POLYFACT_TOKEN environment variable:

export POLYFACT_TOKEN= # The token displayed on https://app.polyfact.com

💡 Examples

There are more examples and tutorials in the Documentation but here's a simple chatbot to get you started:

import * as readline from "node:readline/promises";
import { stdin as input, stdout as output } from "node:process";
import { Chat } from "polyfact";

const rl = readline.createInterface({ input, output });

async function chatREPL() {
    const chat = new Chat();

    while (true) {
        const userInput = await rl.question("> ");

        console.log(await chat.sendMessage(userInput));
    }
}

chatREPL()

📫 Contact us

We strive for feedback and want to understand everyone's needs, and you can hang out with us on Discord!

🧑‍💻 Contributing

PolyFact is open-source! You can contribute to this package or the API by opening an issue or a PR!

FAQs

Package last updated on 09 Aug 2023

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