@baseai/core
Advanced tools
Comparing version 0.9.21 to 0.9.22
# `baseai` SDK | ||
## 0.9.22 | ||
### Patch Changes | ||
- 🐛 FIX: Anthropic streaming | ||
- 84d789c: 🐛 FIX: Anthropic streaming | ||
## 0.9.21 | ||
@@ -4,0 +11,0 @@ |
@@ -99,2 +99,3 @@ import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream'; | ||
rawResponse?: boolean; | ||
runTools?: boolean; | ||
} | ||
@@ -101,0 +102,0 @@ interface RunOptionsStream extends RunOptions { |
@@ -888,2 +888,3 @@ "use strict"; | ||
async run(options) { | ||
var _a; | ||
const endpoint = "/beta/pipes/run"; | ||
@@ -893,2 +894,4 @@ const requestedStream = this.isStreamRequested(options); | ||
this.warnIfToolsWithStream(requestedStream); | ||
const runTools = (_a = options.runTools) != null ? _a : true; | ||
delete options.runTools; | ||
const body = { ...options, stream }; | ||
@@ -899,3 +902,3 @@ let response = await this.createRequest(endpoint, body); | ||
} | ||
if (stream) { | ||
if (stream || !runTools) { | ||
return response; | ||
@@ -902,0 +905,0 @@ } |
{ | ||
"name": "@baseai/core", | ||
"description": "The Web AI Framework's core - BaseAI.dev", | ||
"version": "0.9.21", | ||
"version": "0.9.22", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "sideEffects": false, |
@@ -79,2 +79,3 @@ import { ChatCompletionStream } from 'openai/lib/ChatCompletionStream'; | ||
rawResponse?: boolean; | ||
runTools?: boolean; | ||
} | ||
@@ -81,0 +82,0 @@ interface RunOptionsStream extends RunOptions { |
@@ -874,2 +874,3 @@ "use strict"; | ||
async run(options) { | ||
var _a; | ||
const endpoint = "/beta/pipes/run"; | ||
@@ -879,2 +880,4 @@ const requestedStream = this.isStreamRequested(options); | ||
this.warnIfToolsWithStream(requestedStream); | ||
const runTools = (_a = options.runTools) != null ? _a : true; | ||
delete options.runTools; | ||
const body = { ...options, stream }; | ||
@@ -885,3 +888,3 @@ let response = await this.createRequest(endpoint, body); | ||
} | ||
if (stream) { | ||
if (stream || !runTools) { | ||
return response; | ||
@@ -888,0 +891,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
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
436633
5179