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

moonshot-node

v0.0.5

Published

moonshot kimi AI nodejs/Typescript OpenAPI SDK

Downloads

16

Readme

moonshot Nodejs SDK

npm version npm downloads

Moonshot AI Nodejs/Typescript API SDK.

月之暗面 AI Nodejs/Typescript API SDK.

Moonshot API 文档

Moonshot AI 控制台

Kimi 智能助手

Powered By Pontx

Features

  • 覆盖支持月之暗面所有开放 API。
  • 同时支持 JS/TS。
  • Typescript 类型提示完备,
  • SDK 具备自文档性。参考了月之暗面官方文档及 OpenAI 相关 API 文档,生成了注释及类型完备的 SDK。

Installation

npm i -S moonshot-node

Usage

const { createSDK } = require("moonshot-node");

const Moonshot = createSDK({
  accessToken: process.env.MOONSHOT_TOKEN,
});

const main = async () => {
  const result = await Moonshot.chat.createStreamChatCompletion.request({
    model: "moonshot-v1-128k",
    messages: [
      {
        role: "user",
        content: "请介绍月之暗面的产品优势",
      },
    ],
    stream: true,
  });

  while (true) {
    const { done, value } = await result.readContent();
    process.stdout.write(value);
    if (done) {
      return;
    }
  }
};

main();

打印信息如下:

月之暗面(Moonshot Corp.)是一家虚构的公司,因此,我将为您提供一个假设性的产品优势介绍。请注意,以下信息并非基于现实中的公司或产品。

月之暗面的产品优势:

1. 创新技术:月之暗面致力于研发前沿科技,以满足客户不断变化的需求。我们的产品采用了最新的技术,确保在性能、效率和可靠性方面处于行业领先地位。

2. 定制解决方案:我们明白每个客户的需求都是独特的,因此我们提供定制化的解决方案,以满足不同行业和应用场景的需求。我们的专业团队将与您紧密合作,确保为您提供最佳的产品和服务。

...更多打印信息略