New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bnk/ai

Package Overview
Dependencies
Maintainers
0
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bnk/ai - npm Package Compare versions

Comparing version 1.0.11 to 1.0.12

2

package.json

@@ -6,3 +6,3 @@ {

"type": "module",
"version": "1.0.11",
"version": "1.0.12",
"scripts": {

@@ -9,0 +9,0 @@ "test": "bun test src/",

@@ -14,3 +14,2 @@ import { OPENROUTER_BASE_URL } from "../constants/provider-defauls";

private apiKey: string;
private systemMessage?: string;
public readonly delimiter: SSEDelimiter = '\n\n';

@@ -20,7 +19,6 @@

this.apiKey = apiKey;
this.systemMessage = systemMessage;
}
async prepareRequest(params: SSEEngineParams) {
const { userMessage, options, debug, } = params;
const { userMessage, options, debug, systemMessage } = params;

@@ -36,4 +34,4 @@ const referrer = options?.referrer

const messages = [];
if (this.systemMessage) {
messages.push({ role: "system", content: this.systemMessage });
if (systemMessage) {
messages.push({ role: "system", content: systemMessage });
}

@@ -40,0 +38,0 @@ messages.push({ role: "user", content: userMessage });

@@ -84,2 +84,3 @@ /**

const endpoint = "https://openrouter.ai/api/v1/chat/completions"; // Or your base
const response = await fetch(endpoint, {

@@ -86,0 +87,0 @@ method: "POST",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc