@ai-sdk/vue
Advanced tools
Comparing version 0.0.9 to 0.0.10
# @ai-sdk/vue | ||
## 0.0.10 | ||
### Patch Changes | ||
- d3100b9c: feat (ai/ui): support custom fetch function in useChat, useCompletion, useAssistant, useObject | ||
- Updated dependencies [d3100b9c] | ||
- @ai-sdk/ui-utils@0.0.8 | ||
## 0.0.9 | ||
@@ -4,0 +12,0 @@ |
@@ -42,3 +42,3 @@ import { Message, CreateMessage, ChatRequestOptions, JSONValue, UseChatOptions, RequestOptions, UseCompletionOptions } from '@ai-sdk/ui-utils'; | ||
}; | ||
declare function useChat({ api, id, initialMessages, initialInput, sendExtraMessageFields, experimental_onFunctionCall, streamMode, onResponse, onFinish, onError, credentials, headers, body, generateId, }?: UseChatOptions): UseChatHelpers; | ||
declare function useChat({ api, id, initialMessages, initialInput, sendExtraMessageFields, experimental_onFunctionCall, streamMode, onResponse, onFinish, onError, credentials, headers, body, generateId, fetch, }?: UseChatOptions): UseChatHelpers; | ||
@@ -81,4 +81,4 @@ type UseCompletionHelpers = { | ||
}; | ||
declare function useCompletion({ api, id, initialCompletion, initialInput, credentials, headers, body, streamMode, onResponse, onFinish, onError, }?: UseCompletionOptions): UseCompletionHelpers; | ||
declare function useCompletion({ api, id, initialCompletion, initialInput, credentials, headers, body, streamMode, onResponse, onFinish, onError, fetch, }?: UseCompletionOptions): UseCompletionHelpers; | ||
export { UseChatHelpers, UseCompletionHelpers, useChat, useCompletion }; |
@@ -59,3 +59,4 @@ "use strict"; | ||
body, | ||
generateId = import_ui_utils.generateId | ||
generateId = import_ui_utils.generateId, | ||
fetch | ||
} = {}) { | ||
@@ -119,3 +120,2 @@ var _a, _b; | ||
api, | ||
messages: constructedMessagesPayload, | ||
body: { | ||
@@ -147,3 +147,6 @@ messages: constructedMessagesPayload, | ||
}, | ||
generateId | ||
generateId, | ||
onToolCall: void 0, | ||
// not implemented yet | ||
fetch | ||
}); | ||
@@ -244,3 +247,4 @@ }, | ||
onFinish, | ||
onError | ||
onError, | ||
fetch | ||
} = {}) { | ||
@@ -297,3 +301,4 @@ var _a; | ||
mutateStreamData(() => [...existingData, ...data2 != null ? data2 : []]); | ||
} | ||
}, | ||
fetch | ||
}); | ||
@@ -300,0 +305,0 @@ } |
{ | ||
"name": "@ai-sdk/vue", | ||
"version": "0.0.9", | ||
"version": "0.0.10", | ||
"license": "Apache-2.0", | ||
@@ -18,3 +18,3 @@ "sideEffects": false, | ||
"dependencies": { | ||
"@ai-sdk/ui-utils": "0.0.7", | ||
"@ai-sdk/ui-utils": "0.0.8", | ||
"swrv": "1.0.4" | ||
@@ -21,0 +21,0 @@ }, |
@@ -86,2 +86,3 @@ import type { | ||
generateId = generateIdFunc, | ||
fetch, | ||
}: UseChatOptions = {}): UseChatHelpers { | ||
@@ -168,3 +169,2 @@ // Generate a unique ID for the chat if not provided. | ||
api, | ||
messages: constructedMessagesPayload, | ||
body: { | ||
@@ -199,2 +199,4 @@ messages: constructedMessagesPayload, | ||
generateId, | ||
onToolCall: undefined, // not implemented yet | ||
fetch, | ||
}); | ||
@@ -201,0 +203,0 @@ }, |
@@ -70,2 +70,3 @@ import type { | ||
onError, | ||
fetch, | ||
}: UseCompletionOptions = {}): UseCompletionHelpers { | ||
@@ -136,2 +137,3 @@ // Generate an unique id for the completion if not provided. | ||
}, | ||
fetch, | ||
}); | ||
@@ -138,0 +140,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
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
Network access
Supply chain riskThis module accesses the network.
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
90349
1350
4
+ Added@ai-sdk/ui-utils@0.0.8(transitive)
- Removed@ai-sdk/ui-utils@0.0.7(transitive)
Updated@ai-sdk/ui-utils@0.0.8