Skip to content

Commit

Permalink
📝 Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
noraincode committed Apr 11, 2024
1 parent be487be commit d51efd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# kimichat-js
# kimichat.js

[![CI](https://github.com/noraincode/kimichat-js/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/noraincode/kimichat-js/actions/workflows/ci.yml)

[English Version](./README_EN.md)

kimichat-js 是一个非官方的 Kimi Chat SDK,使用 TypeScript 和 undici 库开发
kimichat.js 是一个非官方的 Kimi Chat SDK,使用 TypeScript 和 undici 库开发

本项目旨在提供一个简单、高效的方式来接入和使用 [Kimi Chat](https://kimi.moonshot.cn/) 的官方 API

Expand All @@ -18,21 +18,21 @@ kimichat-js 是一个非官方的 Kimi Chat SDK,使用 TypeScript 和 undici

```sh
# 使用 npm 安装:
npm install kimichat-js
npm install kimichat.js

# 使用 yarn 安装:
yarn add kimichat-js
yarn add kimichat.js

# 使用 pnpm 安装
pnpm i kimichat-js
pnpm i kimichat.js
```

## 使用方法

> 请注意, 流式调用需要调用方传入自定义的回调方法, 用于处理数据流
```typescript
import { KimiChat } from "kimichat-js";
import { KimiChat } from "kimichat.js";
import { PassThrough } from "stream";

const kimi = new KimiChat("Your API Key");
Expand Down Expand Up @@ -106,4 +106,4 @@ data: [DONE]

---

欢迎贡献代码,一起完善 kimichat-js!
欢迎贡献代码,一起完善 kimichat.js!
12 changes: 6 additions & 6 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# kimichat-js
# kimichat.js

[![CI](https://github.com/noraincode/kimichat-js/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/noraincode/kimichat-js/actions/workflows/ci.yml)

Expand All @@ -18,21 +18,21 @@ This project aims to provide a simple and efficient way to integrate and use the

```sh
# Install using npm:
npm install kimichat-js
npm install kimichat.js

# Install using yarn:
yarn add kimichat-js
yarn add kimichat.js

# Install using pnpm
pnpm i kimichat-js
pnpm i kimichat.js
```

## Usage

> Please note that streaming calls require the caller to pass in a custom callback method for processing the data stream.
```typescript
import { KimiChat } from "kimichat-js";
import { KimiChat } from "kimichat.js";

const kimi = new KimiChat("Your API Key");

Expand Down Expand Up @@ -104,4 +104,4 @@ This project is an unofficial version and is not produced by Kimi Chat official.

---

Contributions are welcome to improve kimichat-js!
Contributions are welcome to improve kimichat.js!

0 comments on commit d51efd5

Please sign in to comment.