
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@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.
Ingester
getStringsFromSource
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's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.