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

@ai-sdk/ui-utils

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/ui-utils - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

5

./dist/index.js

@@ -481,6 +481,3 @@ "use strict";

method: "POST",
body: JSON.stringify({
messages,
...body
}),
body: JSON.stringify(body),
headers: {

@@ -487,0 +484,0 @@ "Content-Type": "application/json",

34

dist/index.d.ts

@@ -100,6 +100,21 @@ export { generateId } from '@ai-sdk/provider-utils';

interface ToolCall {
/**
* The ID of the tool call.
*/
id: string;
/**
* The type of the tool. Currently, only `function` is supported.
*/
type: string;
/**
* The function that the model called.
*/
function: {
/**
* The name of the function.
*/
name: string;
/**
* The arguments to call the function with, as generated by the model in JSON
*/
arguments: string;

@@ -172,2 +187,5 @@ };

content: string;
/**
* @deprecated Use AI SDK 3.1 `toolInvocations` instead.
*/
tool_call_id?: string;

@@ -220,6 +238,18 @@ /**

options?: RequestOptions;
data?: Record<string, string>;
/**
* @deprecated
*/
functions?: Array<Function>;
/**
* @deprecated
*/
function_call?: FunctionCall;
data?: Record<string, string>;
/**
* @deprecated
*/
tools?: Array<Tool>;
/**
* @deprecated
*/
tool_choice?: ToolChoice;

@@ -425,3 +455,3 @@ };

type JSONValue = null | string | number | boolean | {
[x: string]: JSONValue;
[value: string]: JSONValue;
} | Array<JSONValue>;

@@ -428,0 +458,0 @@ type AssistantMessage = {

@@ -481,6 +481,3 @@ "use strict";

method: "POST",
body: JSON.stringify({
messages,
...body
}),
body: JSON.stringify(body),
headers: {

@@ -487,0 +484,0 @@ "Content-Type": "application/json",

{
"name": "@ai-sdk/ui-utils",
"version": "0.0.5",
"version": "0.0.6",
"license": "Apache-2.0",

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

@@ -5,11 +5,13 @@ declare function mockFetchTextStream({ url, chunks, }: {

}): void;
declare function mockFetchDataStream({ url, chunks, }: {
declare function mockFetchDataStream({ url, chunks, maxCalls, }: {
url: string;
chunks: string[];
maxCalls?: number;
}): {
requestBody: Promise<unknown>;
};
declare function mockFetchDataStreamWithGenerator({ url, chunkGenerator, }: {
declare function mockFetchDataStreamWithGenerator({ url, chunkGenerator, maxCalls, }: {
url: string;
chunkGenerator: AsyncGenerator<Uint8Array, void, unknown>;
maxCalls?: number;
}): {

@@ -16,0 +18,0 @@ requestBody: Promise<unknown>;

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 too big to display

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