
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@polymath-ai/ingest
Advanced tools
This is a libraries that can be used to ingest data from a source and convert it into a format that can be used by the Polymath system.
See: @polymath/cli
Ingester for use in the CLIYou are able to extend the Ingester class to create your own importer.
IngestergetStringsFromSource method
a. getStringsFromSource should return an AsyncGenerator of partially filled out bits that is the full string of data from the source.
b. The text property of the bit should be the full string of data from the source. The info property of the bit should be an object that contains any additional information about the bit. The info property is optional.class MYRSS extends Ingester {
constructor() {
super();
}
async *getStringsFromSource(source: string): AsyncGenerator<Bit> {
const feed = await (new RSSParser).parseURL(source);
console.log(feed.title); // feed will have a `foo` property, type as a string
for (const item of feed.items) {
yield {
text: item.content || "",
info: {
url: item.link || "",
title: item.title || "",
}
};
}
}
}
E.g:
> polymath ingest rss https://paul.kinlan.me/index.xml
Ingest processIt is possible to use the Ingest process directly in your own code, for example if you want to run a custom export as the embeddings are generated. The process will load the correct plugin and start processing it.
import { Ingest } from "@polymath/ingest";
const ingest = new Ingest({ /* options */ });
for await(const bit of ingest.run({ args, options, command })) {
console.log(`${bit.url}: Embedding: ${bit.embedding}`);)
}
FAQs
An ingest library for Polymath
We found that @polymath-ai/ingest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.