@ai-sdk/ui-utils
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -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", |
@@ -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
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
3977093
36722