🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
0.9.15-snapshot.0

29

dist/index.d.ts

@@ -89,2 +89,5 @@ import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream';

interface Runner extends ChatCompletionStream<null> {
}
interface Variable {

@@ -270,26 +273,2 @@ name: string;

interface Runner extends ChatCompletionStream<null> {
}
/**
* Converts a ReadableStream into a Runner.
*
* @param readableStream - The ReadableStream to convert.
* @returns The converted Runner.
*/
declare const fromReadableStream: (readableStream: ReadableStream) => Runner;
/**
* Returns a runner for the given readable stream.
*
* @param readableStream - The readable stream to create a runner for.
* @returns A runner for the given readable stream.
*/
declare const getRunner: (readableStream: ReadableStream) => Runner;
/**
* Retrieves the text part from a given ChunkStream.
*
* @param chunk - The ChunkStream object.
* @returns The text content of the first choice's delta, or an empty string if it doesn't exist.
*/
declare const getTextPart: (chunk: ChunkStream) => string;
export { type Chunk, type ChunkStream, type Memory as MemoryI, type Message, type MessageRole, Pipe, type Pipe$1 as PipeI, type PipeOptions, type RunOptions, type RunOptionsStream, type RunResponse, type RunResponseStream, type Runner, type Tool as ToolI, type Usage, type Variable, fromReadableStream, generateText, getRunner, getTextContent, getTextDelta, getTextPart, isContent, isToolCall, isUnknown, printStreamToStdout, processChunk, streamText };
export { type Chunk, type ChunkStream, type Memory as MemoryI, type Message, type MessageRole, Pipe, type Pipe$1 as PipeI, type PipeOptions, type RunOptions, type RunOptionsStream, type RunResponse, type RunResponseStream, type Tool as ToolI, type Usage, type Variable, generateText, getTextContent, getTextDelta, isContent, isToolCall, isUnknown, printStreamToStdout, processChunk, streamText };

@@ -24,8 +24,5 @@ "use strict";

Pipe: () => Pipe,
fromReadableStream: () => fromReadableStream,
generateText: () => generateText,
getRunner: () => getRunner,
getTextContent: () => getTextContent,
getTextDelta: () => getTextDelta,
getTextPart: () => getTextPart,
isContent: () => isContent,

@@ -40,15 +37,2 @@ isToolCall: () => isToolCall,

// src/helpers/stream.ts
var import_ChatCompletionStream = require("openai/lib/ChatCompletionStream");
var fromReadableStream = (readableStream) => {
return import_ChatCompletionStream.ChatCompletionStream.fromReadableStream(readableStream);
};
var getRunner = (readableStream) => {
return fromReadableStream(readableStream);
};
var getTextPart = (chunk) => {
var _a, _b;
return ((_b = (_a = chunk.choices[0]) == null ? void 0 : _a.delta) == null ? void 0 : _b.content) || "";
};
// src/common/request.ts

@@ -998,8 +982,5 @@ var import_streaming = require("openai/streaming");

Pipe,
fromReadableStream,
generateText,
getRunner,
getTextContent,
getTextDelta,
getTextPart,
isContent,

@@ -1006,0 +987,0 @@ isToolCall,

2

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

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

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