npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

llm-ops

v0.0.12

Published

高效制作llm workflow的低代码框架

Downloads

11

Readme

llmops

llm-ops

llm-ops是一款助力AIGC落地应用、高效开发llm workflow的低代码TS框架。

快速上手

npm install llm-ops

特点

  • 工厂模式设计: 选择LLM-OPS意味着选择了简便与专业!您无需深究复杂的内部结构,只需简单几步,如同开箱即用的神器。
  • 低代码开发: 真正实现了一键式开发。只需简单地编写一段JSON代码,即可轻松实现您所想要的完整业务流程,大大减少了开发难度和学习成本。
  • 全面支持TypeScript: LLM-OPS框架不仅基于TypeScript开发,更为开发者提供了完整的TsDoc注释。这让您在开发过程中更加流畅,无需反复查询文档,一切都变得清晰明了。
  • AI制作的Workflow引擎: 无论是构建复杂的企业应用还是快速打造创新项目,LLM-OPS都能为您提供稳定而高效的工作流引擎,真正做到快速开发,快速上线!

低代码workflow示意图

pipeline示意图

使用例程

import { Pipeline, PipeRegistry } from "llm-ops";
const funcStore = PipeRegistry.init();
const schema = `
export interface subsectionSchema {
  subsection: articleSchema[];
  title: string; // 整篇PPT文稿的标题
  reason: string; // 为什么要这么分段,必须要符合PPT大纲的逻辑
}
export interface articleSchema {
  content: string; //每一段的文本
  title: string; // 每一段起一个小标题,非常凝练这一段主要的内容是什么,同时与其他段落保持一个一致性的风格
}`;
const reqMessages = [
  {
    role: "system",
    content:
      "你是一个专职PPT文稿大纲处理的助手,将会对user输入的文稿进行分段,并进行中心点提取成小标题。给出整篇PPT文稿的标题,分段的理由,每段小标题和对应的内容。",
  },
];
const pipelineJson = {
  pipes: [
    {
      id: "polish",
      use: "llm",
      params: {
        messages: [
          {
            role: "system",
            content:
              "你是一个专职PPT文稿处理的助手,将会对user输入的文稿进行润色扩写,内容补充,但是原来的一些信息要点不丢失。",
          },
        ],
      },
    },
    {
      id: "subsection",
      use: "chain",
      params: {
        chainName: "typeChat",
        struct: {
          schema,
          typeName: "subsectionSchema",
        },
        prompt: reqMessages,
        bound: false,
      },
    },
  ],
};
const pipeline = Pipeline.fromJSON(pipelineJson, {}, funcStore);
const res = (await pipeline.execute(
  `尊敬的各位评审,大家好!今天我有幸站在这里,展示我们的项目:“ChatPPT”,一款赋能新时代、引领PPT制作革命的创新平台。
我想强调的是,这不仅是一个创新平台,它更代表着我们对未来技术的展望和追求。`,
)) as Record<string, any>;
console.log(JSON.stringify(res["subsection"]));

框架设计结构

框架设计结构

🎨 技术栈

  • Openai
  • Jest
  • Typescript
  • Vitepress
  • Eslint
  • Prettier
  • MarkdownLint
  • Github Actions
  • Milvus

📄 作者

(C) 2023 Marlene, Idealeap

mmqrcode1695990806194

备注来自Github,回复加入idealeap交流群,即被拉入微信技术交流群,欢迎一起交流~

License

MIT