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

feisi

v1.1.3

Published

飞思,一个多Prompt协同的GPT

Downloads

11

Readme

README

对外提供的方法

run(content: string, context: IPromptExample[]): Promise<IRunResult>;

类型声明

/**
 * @description: 节点类型定义
 */
declare enum EnumFolwNodeType {
    /**
     * 开始节点
     * @example 开始节点
     */
    start = 1000,
    /**
     * 逻辑判断节点
     */
    logic = 1001,
    /**
     * 流程处理节点
     */
    process = 1002,
    /**
     * 分类节点
     */
    classify = 1003,
    /**
     * 随机回复节点
     */
    randomReplyNode = 1004,
    /**
     * 自定义格式节点
     */
    customFormatNode = 1005,
    /**
     * 结束节点
     */
    end = 2000,
    /**
     * 异常节点
     */
    error = 3000,
    /**
     * 多语言节点
     */
    multiLanguage = 4000,
    /**
     * 人工节点
     */
    manual = 5000
}

interface IPromptExample {
    question: string;
    answer: string;
}

interface IClassifyFlowNode {
    text: string;
    nextStep: number;
}

interface IFlowNode {
    /**
     * 节点名称
     * @example 开始节点
     */
    name: string;
    /**
     * 节点类型
     * @example 1000
     */
    type: EnumFolwNodeType;
    /**
     * 节点编码
     * @example 1000
     */
    code: number;
    /**
     * 节点提示文本,用于 AI 提示词
     * @example 请问这段代码的时间复杂度是多少?
     */
    promptText: string;
    /**
     * 下一步节点编码
     * @example 1001
     */
    nextStep?: number;
    /**
     * 异常节点编码
     * @example 3000
     */
    errorSetp: number;
    /**
     * 是节点编码
     * @example 1002
     */
    yesStep?: number;
    /**
     * 否节点编码
     * @example 3000
     */
    noStep?: number;
    /**
     * 随机回复列表
     * @example ['https://www.google.com','https://www.baidu.com']
     */
    replyList?: string[];
    /**
     * 自定义格式
     * @example {{content}} https://www.google.com
     */
    format?: string;
    /**
     * 分类节点列表
     * @example [{text:'寒暄',nextStep:10002},{text:'提现',nextStep:10003},{text:'其他',nextStep:10004}]
     */
    list?: IClassifyFlowNode[];
    /**
     * 示例
     */
    examples?: IPromptExample[];
    /***
     * 进入了人工节点的提示文本
     */
    manualPromptText?: string;
    /**
     * 是否带上下文
     */
    withContext: boolean;
}

interface ISetp {
    lang: string;
    flowNode: IFlowNode;
    question: string;
    answer: string;
    nextStepId: number;
}
interface IRunResult {
    code: 200 | 500;
    answer: string;
    setps: ISetp[];
}