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

@ai-sdk/svelte

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/svelte - npm Package Compare versions

Comparing version 1.0.0-canary.1 to 1.0.0-canary.2

15

./dist/index.js

@@ -97,4 +97,3 @@ "use strict";

sendExtraMessageFields,
streamMode,
streamProtocol,
streamProtocol = "data",
onResponse,

@@ -110,8 +109,4 @@ onFinish,

keepLastMessageOnError = false,
maxToolRoundtrips = 0,
maxSteps = maxToolRoundtrips != null ? maxToolRoundtrips + 1 : 1
maxSteps = 1
} = {}) {
if (streamMode) {
streamProtocol != null ? streamProtocol : streamProtocol = streamMode === "text" ? "text" : void 0;
}
const chatId = id || `chat-${uniqueId++}`;

@@ -321,4 +316,3 @@ const key = `${api}|${chatId}`;

body,
streamMode,
streamProtocol,
streamProtocol = "data",
onResponse,

@@ -329,5 +323,2 @@ onFinish,

} = {}) {
if (streamMode) {
streamProtocol != null ? streamProtocol : streamProtocol = streamMode === "text" ? "text" : void 0;
}
const completionId = id || `completion-${uniqueId2++}`;

@@ -334,0 +325,0 @@ const key = `${api}|${completionId}`;

# @ai-sdk/svelte
## 1.0.0-canary.2
### Major Changes
- e117b54: chore (ui): remove deprecated useChat roundtrip options
- 7814c4b: chore (ui): remove streamMode setting from useChat & useCompletion
### Patch Changes
- Updated dependencies [b469a7e]
- Updated dependencies [7814c4b]
- Updated dependencies [db46ce5]
- @ai-sdk/provider-utils@2.0.0-canary.0
- @ai-sdk/ui-utils@1.0.0-canary.2
## 1.0.0-canary.1

@@ -4,0 +19,0 @@

19

dist/index.d.ts

@@ -7,17 +7,2 @@ import { UseChatOptions as UseChatOptions$1, Message, CreateMessage, ChatRequestOptions, JSONValue, RequestOptions, UseCompletionOptions, AssistantStatus, UseAssistantOptions } from '@ai-sdk/ui-utils';

/**
Maximum number of automatic roundtrips for tool calls.
An automatic tool call roundtrip is a call to the server with the
tool call results when all tool calls in the last assistant
message have results.
A maximum number is required to prevent infinite loops in the
case of misconfigured tools.
By default, it's set to 0, which will disable the feature.
@deprecated Use `maxSteps` instead (which is `maxToolRoundtrips` + 1).
*/
maxToolRoundtrips?: number;
/**
Maximum number of sequential LLM calls (steps), e.g. when you use tool calls. Must be at least 1.

@@ -73,3 +58,3 @@

};
declare function useChat({ api, id, initialMessages, initialInput, sendExtraMessageFields, streamMode, streamProtocol, onResponse, onFinish, onError, onToolCall, credentials, headers, body, generateId, fetch, keepLastMessageOnError, maxToolRoundtrips, maxSteps, }?: UseChatOptions): UseChatHelpers & {
declare function useChat({ api, id, initialMessages, initialInput, sendExtraMessageFields, streamProtocol, onResponse, onFinish, onError, onToolCall, credentials, headers, body, generateId, fetch, keepLastMessageOnError, maxSteps, }?: UseChatOptions): UseChatHelpers & {
addToolResult: ({ toolCallId, result, }: {

@@ -117,3 +102,3 @@ toolCallId: string;

};
declare function useCompletion({ api, id, initialCompletion, initialInput, credentials, headers, body, streamMode, streamProtocol, onResponse, onFinish, onError, fetch, }?: UseCompletionOptions): UseCompletionHelpers;
declare function useCompletion({ api, id, initialCompletion, initialInput, credentials, headers, body, streamProtocol, onResponse, onFinish, onError, fetch, }?: UseCompletionOptions): UseCompletionHelpers;

@@ -120,0 +105,0 @@ type UseAssistantHelpers = {

@@ -97,4 +97,3 @@ "use strict";

sendExtraMessageFields,
streamMode,
streamProtocol,
streamProtocol = "data",
onResponse,

@@ -110,8 +109,4 @@ onFinish,

keepLastMessageOnError = false,
maxToolRoundtrips = 0,
maxSteps = maxToolRoundtrips != null ? maxToolRoundtrips + 1 : 1
maxSteps = 1
} = {}) {
if (streamMode) {
streamProtocol != null ? streamProtocol : streamProtocol = streamMode === "text" ? "text" : void 0;
}
const chatId = id || `chat-${uniqueId++}`;

@@ -321,4 +316,3 @@ const key = `${api}|${chatId}`;

body,
streamMode,
streamProtocol,
streamProtocol = "data",
onResponse,

@@ -329,5 +323,2 @@ onFinish,

} = {}) {
if (streamMode) {
streamProtocol != null ? streamProtocol : streamProtocol = streamMode === "text" ? "text" : void 0;
}
const completionId = id || `completion-${uniqueId2++}`;

@@ -334,0 +325,0 @@ const key = `${api}|${completionId}`;

{
"name": "@ai-sdk/svelte",
"version": "1.0.0-canary.1",
"version": "1.0.0-canary.2",
"license": "Apache-2.0",

@@ -22,4 +22,4 @@ "sideEffects": false,

"dependencies": {
"@ai-sdk/provider-utils": "1.0.22",
"@ai-sdk/ui-utils": "1.0.0-canary.1",
"@ai-sdk/provider-utils": "2.0.0-canary.0",
"@ai-sdk/ui-utils": "1.0.0-canary.2",
"sswr": "^2.1.0"

@@ -26,0 +26,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

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