-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hi.
I just wanted to test the code below from here : https://openrouter.ai/docs/sdks/typescript/overview
import { OpenRouter } from "@openrouter/sdk";
import dotenv from "dotenv";
dotenv.config();
const api_key = process.env.API_KEY;
const client = new OpenRouter({
apiKey: api_key,
});
const response = await client.chat.send({
model: "minimax/minimax-m2",
messages: [{ role: "user", content: "Explain quantum computing" }],
});I have this error appearing on my IDE :
No overload matches this call.
Overload 1 of 3, '(request: SendChatCompletionRequestRequest & { chatGenerationParams: { stream?: false | undefined; }; }, options?: RequestOptions | undefined): Promise<...>', gave the following error.
Object literal may only specify known properties, and 'model' does not exist in type 'SendChatCompletionRequestRequest & { chatGenerationParams: { stream?: false | undefined; }; }'.
Overload 2 of 3, '(request: SendChatCompletionRequestRequest & { chatGenerationParams: { stream: true; }; }, options?: RequestOptions | undefined): Promise<...>', gave the following error.
Object literal may only specify known properties, and 'model' does not exist in type 'SendChatCompletionRequestRequest & { chatGenerationParams: { stream: true; }; }'.
Overload 3 of 3, '(request: SendChatCompletionRequestRequest, options?: RequestOptions | undefined): Promise', gave the following error.
Object literal may only specify known properties, and 'model' does not exist in type 'SendChatCompletionRequestRequest'.
For the moment I'll use OpenRouter.callModel() but I don't exactly know the difference