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

@baseai/core

Package Overview
Dependencies
Maintainers
0
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baseai/core - npm Package Compare versions

Comparing version 0.9.32 to 0.9.33-snapshot.0

1

dist/index.d.ts

@@ -100,2 +100,3 @@ import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream';

runTools?: boolean;
name?: string;
}

@@ -102,0 +103,0 @@ interface RunOptionsStream extends RunOptions {

19

dist/index.js

@@ -874,3 +874,3 @@ "use strict";

}
async handleStreamResponse(options, response) {
async handleStreamResponse(options, response, pipeName) {
const endpoint = "/v1/pipes/run";

@@ -916,3 +916,4 @@ const stream = this.isStreamRequested(options);

threadId: currentResponse.threadId
}
},
pipeName
);

@@ -934,2 +935,3 @@ callCount++;

const hasTools = this.pipe.tools.length > 0;
const pipeName = options.name || this.pipe.name;
let stream = this.isStreamRequested(options);

@@ -943,3 +945,3 @@ if (isAnthropic && hasTools && stream) {

const body = { ...options, stream };
let response = await this.createRequest(endpoint, body);
let response = await this.createRequest(endpoint, body, pipeName);
if (Object.entries(response).length === 0) {

@@ -957,3 +959,4 @@ return {};

options,
response
response,
pipeName
);

@@ -982,3 +985,3 @@ }

threadId: currentResponse.threadId
});
}, pipeName);
callCount++;

@@ -994,3 +997,3 @@ if (this.hasNoToolCalls(currentResponse.choices[0].message)) {

}
async createRequest(endpoint, body) {
async createRequest(endpoint, body, pipeName) {
const isProdEnv = this.prod;

@@ -1001,3 +1004,3 @@ const prodOptions = {

...body,
name: this.pipe.name
name: pipeName || this.pipe.name
}

@@ -1017,4 +1020,2 @@ };

};
}
if (!isProdEnv) {
const isServerRunning = await isLocalServerRunning();

@@ -1021,0 +1022,0 @@ if (!isServerRunning) return {};

{
"name": "@baseai/core",
"description": "The Web AI Framework's core - BaseAI.dev",
"version": "0.9.32",
"version": "0.9.33-snapshot.0",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "sideEffects": false,

@@ -80,2 +80,3 @@ import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream';

runTools?: boolean;
name?: string;
}

@@ -82,0 +83,0 @@ interface RunOptionsStream extends RunOptions {

@@ -865,3 +865,3 @@ "use strict";

}
async handleStreamResponse(options, response) {
async handleStreamResponse(options, response, pipeName) {
const endpoint = "/v1/pipes/run";

@@ -907,3 +907,4 @@ const stream = this.isStreamRequested(options);

threadId: currentResponse.threadId
}
},
pipeName
);

@@ -925,2 +926,3 @@ callCount++;

const hasTools = this.pipe.tools.length > 0;
const pipeName = options.name || this.pipe.name;
let stream = this.isStreamRequested(options);

@@ -934,3 +936,3 @@ if (isAnthropic && hasTools && stream) {

const body = { ...options, stream };
let response = await this.createRequest(endpoint, body);
let response = await this.createRequest(endpoint, body, pipeName);
if (Object.entries(response).length === 0) {

@@ -948,3 +950,4 @@ return {};

options,
response
response,
pipeName
);

@@ -973,3 +976,3 @@ }

threadId: currentResponse.threadId
});
}, pipeName);
callCount++;

@@ -985,3 +988,3 @@ if (this.hasNoToolCalls(currentResponse.choices[0].message)) {

}
async createRequest(endpoint, body) {
async createRequest(endpoint, body, pipeName) {
const isProdEnv = this.prod;

@@ -992,3 +995,3 @@ const prodOptions = {

...body,
name: this.pipe.name
name: pipeName || this.pipe.name
}

@@ -1008,4 +1011,2 @@ };

};
}
if (!isProdEnv) {
const isServerRunning = await isLocalServerRunning();

@@ -1012,0 +1013,0 @@ if (!isServerRunning) return {};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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