@baseai/core
Advanced tools
Comparing version 0.9.14 to 0.9.15-snapshot.0
@@ -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, |
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20
4
185381
10
2193