Kimi
The Node.js client and CLI for Moonshot AI(Kimi).
Install / Use
/learn @JacksonTian/KimiREADME
The Node.js library and CLI for Moonshot AI
Installation/安装
npm i @jacksontian/kimi # for scripting
Usage
import Kimi from '@jacksontian/kimi';
const client = new Kimi({
// Do not hard code it here, read it from configuration or enviroment variables
apiKey: 'The API key for moonshot AI'
});
const response = await client.models();
API
-
Chat
chat()models()estimateTokenCount()
-
Files
putFile()putFileStream()files()getFile()getFileContent()deleteFile()
-
Others
getBalance()
The detail of parameters can be found at https://platform.moonshot.cn/docs/api-reference or test/kimi.test.js.
License
The MIT license.
