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.2 to 1.1.3

78

dist/index.d.ts

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

}
interface BaseOptions {
interface PipeBaseOptions {
name: string;

@@ -167,3 +167,3 @@ description?: string;

}
interface BaseResponse {
interface PipeListResponse {
name: string;

@@ -174,11 +174,46 @@ description: string;

url: string;
model: string;
stream: boolean;
json: boolean;
store: boolean;
moderate: boolean;
top_p: number;
max_tokens: number;
temperature: number;
presence_penalty: number;
frequency_penalty: number;
stop: string[];
tool_choice: 'auto' | 'required' | ToolChoice;
parallel_tool_calls: boolean;
messages: Message[];
variables: Variable[] | [];
tools: {
type: 'function';
function: {
name: string;
description?: string;
parameters?: Record<string, any>;
};
}[] | [];
memory: {
name: string;
}[] | [];
}
interface CreateOptions extends BaseOptions {
interface PipeBaseResponse {
name: string;
description: string;
status: 'public' | 'private';
owner_login: string;
url: string;
type: 'chat' | 'generate' | 'run';
api_key: string;
}
interface UpdateOptions extends BaseOptions {
interface PipeCreateOptions extends PipeBaseOptions {
}
interface CreateResponse extends BaseResponse {
interface PipeUpdateOptions extends PipeBaseOptions {
}
interface UpdateResponse extends BaseResponse {
interface PipeCreateResponse extends PipeBaseResponse {
}
interface PipeUpdateResponse extends PipeBaseResponse {
}
declare class Pipe {

@@ -193,4 +228,5 @@ private request;

streamText(options: StreamOptions): Promise<StreamResponse>;
create(options: CreateOptions): Promise<CreateResponse>;
update(options: UpdateOptions): Promise<UpdateResponse>;
create(options: PipeCreateOptions): Promise<PipeCreateResponse>;
update(options: PipeUpdateOptions): Promise<PipeUpdateResponse>;
list(): Promise<PipeListResponse[]>;
}

@@ -203,2 +239,26 @@ /**

export { type CreateOptions, type CreateResponse, type Function, type GenerateOptions, type GenerateResponse, type Message, Pipe, type PipeOptions, type Role, type StreamChunk, type StreamOptions, type StreamResponse, type StreamText, type ToolCall, type UpdateOptions, type UpdateResponse, type Usage, type Variable, fromReadableStream, printStreamToStdout };
interface MemoryOptions {
apiKey: string;
}
interface MemoryBaseResponse {
name: string;
description: string;
owner_login: string;
url: string;
}
interface MemoryCreateOptions {
name: string;
description?: string;
}
interface MemoryCreateResponse extends MemoryBaseResponse {
}
interface MemoryListResponse extends MemoryBaseResponse {
}
declare class Memory {
private request;
constructor(options: MemoryOptions);
create(options: MemoryCreateOptions): Promise<MemoryCreateResponse>;
list(): Promise<MemoryListResponse[]>;
}
export { type Function, type GenerateOptions, type GenerateResponse, Memory, type MemoryCreateOptions, type MemoryCreateResponse, type MemoryListResponse, type MemoryOptions, type Message, Pipe, type PipeCreateOptions, type PipeCreateResponse, type PipeListResponse, type PipeOptions, type PipeUpdateOptions, type PipeUpdateResponse, type Role, type StreamChunk, type StreamOptions, type StreamResponse, type StreamText, type ToolCall, type Usage, type Variable, fromReadableStream, printStreamToStdout };

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

__export(src_exports, {
Memory: () => Memory,
Pipe: () => Pipe,

@@ -586,2 +587,9 @@ fromReadableStream: () => fromReadableStream,

}
if (!options.body) {
return this.handleGenerateResponse({
response,
isChat: false,
threadId: null
});
}
const threadId = response.headers.get("lb-thread-id");

@@ -725,2 +733,7 @@ if (options.body.stream) {

}
async list() {
return this.request.get({
endpoint: "/v1/pipes"
});
}
};

@@ -735,2 +748,21 @@ var printStreamToStdout = async (stream) => {

// src/memory/memory.ts
var Memory = class {
constructor(options) {
const baseUrl = "https://api.langbase.com";
this.request = new Request({ apiKey: options.apiKey, baseUrl });
}
async create(options) {
return this.request.post({
endpoint: "/v1/memory",
body: options
});
}
async list() {
return this.request.get({
endpoint: "/v1/memory"
});
}
};
// src/index.ts

@@ -740,2 +772,3 @@ __reExport(src_exports, require("@baseai/core/helpers"), module.exports);

0 && (module.exports = {
Memory,
Pipe,

@@ -742,0 +775,0 @@ fromReadableStream,

6

package.json
{
"name": "langbase",
"version": "1.1.2",
"version": "1.1.3",
"license": "Apache-2.0",

@@ -29,4 +29,4 @@ "sideEffects": false,

"vitest": "1.6.0",
"@langbase/eslint-config": "1.0.0",
"@langbase/tsconfig": "1.0.0"
"@langbase/tsconfig": "1.0.0",
"@langbase/eslint-config": "1.0.0"
},

@@ -33,0 +33,0 @@ "publishConfig": {

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