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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gettencentaisign

v1.0.0

Published

tencent ai create sign 腾讯ai平台签名生成

Readme

腾讯ai开发平台 node生成 ai签名(sign)

使用方法

以机器人闲聊ai的签名为例:

// 定义值不变的参数对象
const parms = {
  app_id: xxx, // 你的应用id
}
const app_key = 'xxxx' // 你的应用密钥

const GetTencentAiSign = require('getTencentAiSign') // 引入包

实例sign生成器 参数介绍

1.app_key 你的应用密钥 必须要

2.parms 为之前所定义不变的参数对象

3.参数可选 部分接口需要一个session(或其他随机串) 代表当次用户的唯一标识,建议在调用的时候自己传参数进去 如果不传则使用当前的sessionKey作为键 取num位随机字符
  参数类型只支持对象 目前只会生成 sessionKey一个键 num不传默认12

const sign = new GetTencentAiSign(app_key, parms ,{sessionKey:'session', num:12})

获取sign
sign.get() 返回结果

{
  app_id: xxx, 应用id
  sign: xxx, 签名
  session: xxx, 因为上面的例子传了sessionKey 所以生成了一个12位的随机字符串 如果实例的时候没有传sessionKey 则不会生成对应的键
  nonce_str: '', 每次请求需要的随机串
  time_stamp: '' 时间戳
}

sign.get({question: 'i love you',session:10000}) 返回结果

{
  app_id: xxx, 应用id
  sign: xxx, 签名
  session: 10000, 生成器中带了跟sessionKey一样的键 则不会再去生成
  nonce_str: '', 每次请求需要的随机串
  time_stamp: '' 时间戳,
  question: 'i love you' 机器人闲聊接口所需参数
}