moonshot-web-ai-provider
v0.5.0
Published
use the @ai-sdk provider to chat with the Kimi-moonshot web
Readme
moonshot-web-ai-provider
use the [email protected] provider to chat with the Kimi-moonshot web
[!IMPORTANT] This provider can only run in a browser extension environment. Kimi’s API has been updated to version 2. Although version 1 still works, it may stop functioning at any time.
install
this package is published on jsr
npx jsr add @slow-groovin/moonshot-web-ai-providerpnpm dlx jsr add @slow-groovin/moonshot-web-ai-providerbunx jsr add @slow-groovin/moonshot-web-ai-providerusage
import { createMoonshotWebProvider } from "moonshot-web-ai-provider";
const model = createMoonshotWebProvider().languageModel("kimi", {
use_search: true,
});
const { textStream } = streamText({
model: chatModel,
prompt: "hello?",
});config
models
- 'k1.5'
- 'k2'
additional setting
use_search: use search
how to examine the request?
- Open the extension's options page,
- Use F12 to open the console -> Network.
