Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

langbase

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

langbase - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1-snapshot.0

8

dist/index.d.ts
import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream';
import { RunOptionsStream, RunResponseStream, RunOptions, RunResponse } from '@baseai/core';
export { RunOptions, RunOptionsStream, RunResponse, RunResponseStream } from '@baseai/core';
export * from '@baseai/core/helpers';

@@ -123,6 +126,11 @@ declare const fromReadableStream: (readableStream: ReadableStream) => ChatCompletionStream;

baseUrl?: string;
name?: string;
}
declare class Pipe {
private request;
private pipe;
private pipeOptions;
constructor(options: PipeOptions);
run(options: RunOptionsStream): Promise<RunResponseStream>;
run(options: RunOptions): Promise<RunResponse>;
generateText(options: GenerateOptions): Promise<GenerateResponse>;

@@ -129,0 +137,0 @@ streamText(options: StreamOptions): Promise<StreamResponse>;

25

dist/index.js

@@ -18,2 +18,3 @@ "use strict";

};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

@@ -673,7 +674,25 @@

// src/pipes/pipes.ts
var import_core = require("@baseai/core");
var Pipe = class {
constructor(options) {
var _a;
const baseUrl = "https://api.langbase.com";
this.request = new Request({ apiKey: options.apiKey, baseUrl });
this.pipeOptions = options;
this.pipe = new import_core.Pipe({
apiKey: options.apiKey,
// Langbase API key
name: ((_a = options.name) == null ? void 0 : _a.trim()) || "",
// Pipe name
prod: true
});
}
async run(options) {
if (!this.pipeOptions.name) {
throw new Error(
"Pipe name is required with run. Please provide pipe name when creating Pipe instance."
);
}
return await this.pipe.run({ ...options, runTools: false });
}
async generateText(options) {

@@ -699,2 +718,5 @@ return this.request.post({

};
// src/index.ts
__reExport(src_exports, require("@baseai/core/helpers"), module.exports);
// Annotate the CommonJS export names for ESM import in node:

@@ -704,4 +726,5 @@ 0 && (module.exports = {

fromReadableStream,
printStreamToStdout
printStreamToStdout,
...require("@baseai/core/helpers")
});
//# sourceMappingURL=index.js.map

3

package.json
{
"name": "langbase",
"version": "1.1.0",
"version": "1.1.1-snapshot.0",
"license": "Apache-2.0",

@@ -13,2 +13,3 @@ "sideEffects": false,

"dependencies": {
"@baseai/core": "0.9.30",
"dotenv": "^16.4.5",

@@ -15,0 +16,0 @@ "openai": "^4.53.0",

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