@ai-sdk/provider-utils 4.0.0-beta.42 → 4.0.0-beta.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.0-beta.43
4
+
5
+ ### Patch Changes
6
+
7
+ - dce03c4: feat: tool input examples
8
+ - Updated dependencies [dce03c4]
9
+ - @ai-sdk/provider@3.0.0-beta.24
10
+
3
11
  ## 4.0.0-beta.42
4
12
 
5
13
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -944,13 +944,22 @@ type Tool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONVa
944
944
  */
945
945
  providerOptions?: ProviderOptions;
946
946
  /**
947
- The schema of the input that the tool expects. The language model will use this to generate the input.
948
- It is also used to validate the output of the language model.
949
- Use descriptions to make the input understandable for the language model.
947
+ * The schema of the input that the tool expects.
948
+ * The language model will use this to generate the input.
949
+ * It is also used to validate the output of the language model.
950
+ *
951
+ * You can use descriptions on the schema properties to make the input understandable for the language model.
950
952
  */
951
953
  inputSchema: FlexibleSchema<INPUT>;
952
954
  /**
953
- Whether the tool needs approval before it can be executed.
955
+ * An optional list of input examples that show the language
956
+ * model what the input should look like.
957
+ */
958
+ inputExamples?: Array<{
959
+ input: INPUT;
960
+ }>;
961
+ /**
962
+ * Whether the tool needs approval before it can be executed.
954
963
  */
955
964
  needsApproval?: boolean | ToolNeedsApprovalFunction<[INPUT] extends [never] ? unknown : INPUT>;
956
965
  /**
package/dist/index.d.ts CHANGED
@@ -944,13 +944,22 @@ type Tool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONVa
944
944
  */
945
945
  providerOptions?: ProviderOptions;
946
946
  /**
947
- The schema of the input that the tool expects. The language model will use this to generate the input.
948
- It is also used to validate the output of the language model.
949
- Use descriptions to make the input understandable for the language model.
947
+ * The schema of the input that the tool expects.
948
+ * The language model will use this to generate the input.
949
+ * It is also used to validate the output of the language model.
950
+ *
951
+ * You can use descriptions on the schema properties to make the input understandable for the language model.
950
952
  */
951
953
  inputSchema: FlexibleSchema<INPUT>;
952
954
  /**
953
- Whether the tool needs approval before it can be executed.
955
+ * An optional list of input examples that show the language
956
+ * model what the input should look like.
957
+ */
958
+ inputExamples?: Array<{
959
+ input: INPUT;
960
+ }>;
961
+ /**
962
+ * Whether the tool needs approval before it can be executed.
954
963
  */
955
964
  needsApproval?: boolean | ToolNeedsApprovalFunction<[INPUT] extends [never] ? unknown : INPUT>;
956
965
  /**
package/dist/index.js CHANGED
@@ -378,7 +378,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
378
378
  }
379
379
 
380
380
  // src/version.ts
381
- var VERSION = true ? "4.0.0-beta.42" : "0.0.0-test";
381
+ var VERSION = true ? "4.0.0-beta.43" : "0.0.0-test";
382
382
 
383
383
  // src/get-from-api.ts
384
384
  var getOriginalFetch = () => globalThis.fetch;