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

@appcube/node-red-contrib-listenai

v0.0.1

Published

A node set for raising the interactions of automation for a user, powered by AI.

Downloads

7

Readme

Intents A.I For ListenAI

Forked from the @infozap/node-red-contrib-ai-gpt-intent.

这是一组节点,旨在帮助改进现有的自动化流程,使其能够被聊天机器人使用,并利用诸如GPT之类的大型语言模型(LLM)的优势。此集合中包含4个节点:

Register Intent(注册意图)

此节点创建一个可由Call Intent节点激活的订阅。至少,此节点可以用作在不同流程中链接自动化的方式,非常类似于原生的Link In/Link Out节点,但没有使用位置的限制。此外,这些节点会自动添加到OpenAI Chat节点的有效负载中,作为OpenAI可以调用的函数。如果这对您的结果产生负面影响,您可以使用excludeFromOpenAI复选框将它们从有效负载中排除。

您不需要注册同名的意图节点。这会导致不期望的结果。

Call Intent(调用意图)

激活关联的Register Intent节点。当此节点直接附加在OpenAI Response节点之后时,它可以动态激活已注册的意图。要查看此操作,请检查示例文件夹并查找openai-call-registered-intent-example.json

OpenAI Chat(OpenAI聊天)

通过使用来自OpenAI UserOpenAI SystemOpenAI Tools的信息构建有效负载来调用OpenAI。 上述三个节点必须在流程中首先使用,因为它们提供OpenAI Chat所需的信息。

OpenAI User(OpenAI用户)

提供带有role = user的消息,以便在OpenAI的聊天完成有效负载中使用。此节点还能够使用字符串替换,并可以用msg对象的数据替换字符串有效负载中的标记化内容。任何位于单个大括号{}之间的文本都将被视为msg对象中的键。

OpenAI System(OpenAI系统)

提供带有role = system的消息,以便在OpenAI的聊天完成有效负载中使用。此节点还能够使用字符串替换,并可以用msg对象的数据替换字符串有效负载中的标记化内容。任何位于单个大括号{}之间的文本都将被视为msg对象中的键。

OpenAI Tool(OpenAI工具)

提供Open AI可用来处理独家请求的函数。这些节点可以与其他AI Tool节点链接,系统会自动将后续函数附加到同一有效负载上。

OpenAI Response(OpenAI响应)

处理OpenAI的响应。这提供了一致且易于阅读的输出,但也会将OpenAI的原始输出传递到一个名为originalResponse的单独属性中。

如何使用

注意:您需要有一个有效的OpenAI令牌才能使此功能起作用。访问OpenAI

获得有效令牌后,有两种安装方法。

配置节点

Settings.js文件

或者,您可以将令牌添加到settings.js文件中。该文件可以在.node-red/settings.js路径(或某些等效路径)中找到。根据多位用户的报告,位置似乎因安装方式而异。如果遇到问题,您可能需要进行全局搜索。找到文件后,搜索functionGlobalContext属性并添加以下内容:

  functionGlobalContext: {
    openaiAPIKey: "您的API令牌放在这里",
  },

请确保在保存此文件后重新启动node-red。这种方法比配置节点更复杂,但您可以自由共享和导出流程和自动化,因为令牌将在流程中隐藏。