🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@ai-sdk/solid

Package Overview
Dependencies
Maintainers
2
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-sdk/solid - npm Package Compare versions

Comparing version

to
0.0.46

16

./dist/index.js

@@ -132,3 +132,3 @@ "use strict";

const triggerRequest = async (chatRequest) => {
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j;
const messageCount = messagesRef.length;

@@ -141,3 +141,3 @@ try {

getStreamedResponse: () => {
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h2, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i2, _j2, _k, _l, _m, _n, _o, _p, _q, _r;
return getStreamedResponse(

@@ -156,4 +156,4 @@ api(),

(_g3 = (_f3 = useChatOptions()).onFinish) == null ? void 0 : _g3.call(_f3),
(_i = (_h2 = useChatOptions()).onResponse) == null ? void 0 : _i.call(_h2),
(_k = (_j = useChatOptions()).onToolCall) == null ? void 0 : _k.call(_j),
(_i2 = (_h3 = useChatOptions()).onResponse) == null ? void 0 : _i2.call(_h3),
(_k = (_j2 = useChatOptions()).onToolCall) == null ? void 0 : _k.call(_j2),
(_m = (_l = useChatOptions()).sendExtraMessageFields) == null ? void 0 : _m.call(_l),

@@ -184,3 +184,3 @@ (_o = (_n = useChatOptions()).fetch) == null ? void 0 : _o.call(_n),

}
const maxToolRoundtrips = (_g2 = (_f2 = (_e2 = useChatOptions()).maxToolRoundtrips) == null ? void 0 : _f2.call(_e2)) != null ? _g2 : 0;
const maxSteps = (_j = (_f2 = (_e2 = useChatOptions()).maxSteps) == null ? void 0 : _f2.call(_e2)) != null ? _j : ((_i = (_h2 = (_g2 = useChatOptions()).maxToolRoundtrips) == null ? void 0 : _h2.call(_g2)) != null ? _i : 0) + 1;
const messages2 = messagesRef;

@@ -192,5 +192,5 @@ const lastMessage = messages2[messages2.length - 1];

lastMessage != null && // check if the feature is enabled:
maxToolRoundtrips > 0 && // check that roundtrip is possible:
isAssistantMessageWithCompletedToolCalls(lastMessage) && // limit the number of automatic roundtrips:
countTrailingAssistantMessages(messages2) <= maxToolRoundtrips
maxSteps > 1 && // check that next step is possible:
isAssistantMessageWithCompletedToolCalls(lastMessage) && // limit the number of automatic steps:
countTrailingAssistantMessages(messages2) < maxSteps
) {

@@ -197,0 +197,0 @@ await triggerRequest({ messages: messages2 });

# @ai-sdk/solid
## 0.0.46
### Patch Changes
- Updated dependencies [1f590ef]
- @ai-sdk/ui-utils@0.0.43
## 0.0.45

@@ -4,0 +11,0 @@

@@ -56,3 +56,3 @@ import { FetchFunction } from '@ai-sdk/provider-utils';

/**
Maximal number of automatic roundtrips for tool calls.
Maximum number of automatic roundtrips for tool calls.

@@ -67,4 +67,14 @@ An automatic tool call roundtrip is a call to the server with the

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.
A maximum number is required to prevent infinite loops in the case of misconfigured tools.
By default, it's set to 1, which means that only a single LLM call is made.
*/
maxSteps?: number;
};

@@ -71,0 +81,0 @@ declare function useChat(rawUseChatOptions?: UseChatOptions | Accessor<UseChatOptions>): UseChatHelpers & {

@@ -132,3 +132,3 @@ "use strict";

const triggerRequest = async (chatRequest) => {
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i, _j;
const messageCount = messagesRef.length;

@@ -141,3 +141,3 @@ try {

getStreamedResponse: () => {
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h2, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
var _a3, _b3, _c3, _d3, _e3, _f3, _g3, _h3, _i2, _j2, _k, _l, _m, _n, _o, _p, _q, _r;
return getStreamedResponse(

@@ -156,4 +156,4 @@ api(),

(_g3 = (_f3 = useChatOptions()).onFinish) == null ? void 0 : _g3.call(_f3),
(_i = (_h2 = useChatOptions()).onResponse) == null ? void 0 : _i.call(_h2),
(_k = (_j = useChatOptions()).onToolCall) == null ? void 0 : _k.call(_j),
(_i2 = (_h3 = useChatOptions()).onResponse) == null ? void 0 : _i2.call(_h3),
(_k = (_j2 = useChatOptions()).onToolCall) == null ? void 0 : _k.call(_j2),
(_m = (_l = useChatOptions()).sendExtraMessageFields) == null ? void 0 : _m.call(_l),

@@ -184,3 +184,3 @@ (_o = (_n = useChatOptions()).fetch) == null ? void 0 : _o.call(_n),

}
const maxToolRoundtrips = (_g2 = (_f2 = (_e2 = useChatOptions()).maxToolRoundtrips) == null ? void 0 : _f2.call(_e2)) != null ? _g2 : 0;
const maxSteps = (_j = (_f2 = (_e2 = useChatOptions()).maxSteps) == null ? void 0 : _f2.call(_e2)) != null ? _j : ((_i = (_h2 = (_g2 = useChatOptions()).maxToolRoundtrips) == null ? void 0 : _h2.call(_g2)) != null ? _i : 0) + 1;
const messages2 = messagesRef;

@@ -192,5 +192,5 @@ const lastMessage = messages2[messages2.length - 1];

lastMessage != null && // check if the feature is enabled:
maxToolRoundtrips > 0 && // check that roundtrip is possible:
isAssistantMessageWithCompletedToolCalls(lastMessage) && // limit the number of automatic roundtrips:
countTrailingAssistantMessages(messages2) <= maxToolRoundtrips
maxSteps > 1 && // check that next step is possible:
isAssistantMessageWithCompletedToolCalls(lastMessage) && // limit the number of automatic steps:
countTrailingAssistantMessages(messages2) < maxSteps
) {

@@ -197,0 +197,0 @@ await triggerRequest({ messages: messages2 });

{
"name": "@ai-sdk/solid",
"version": "0.0.45",
"version": "0.0.46",
"license": "Apache-2.0",

@@ -23,3 +23,3 @@ "sideEffects": false,

"@ai-sdk/provider-utils": "1.0.18",
"@ai-sdk/ui-utils": "0.0.42"
"@ai-sdk/ui-utils": "0.0.43"
},

@@ -26,0 +26,0 @@ "devDependencies": {

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