@langchain/xai 1.4.16 → 1.4.18
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 +14 -0
- package/dist/chat_models/completions.cjs +1 -1
- package/dist/chat_models/completions.d.cts +9 -10
- package/dist/chat_models/completions.d.cts.map +1 -1
- package/dist/chat_models/completions.d.ts +9 -10
- package/dist/chat_models/completions.d.ts.map +1 -1
- package/dist/chat_models/completions.js +1 -1
- package/dist/chat_models/responses-types.d.cts +94 -95
- package/dist/chat_models/responses-types.d.cts.map +1 -1
- package/dist/chat_models/responses-types.d.ts +94 -95
- package/dist/chat_models/responses-types.d.ts.map +1 -1
- package/dist/chat_models/responses.cjs +1 -1
- package/dist/chat_models/responses.d.cts +2 -2
- package/dist/chat_models/responses.d.cts.map +1 -1
- package/dist/chat_models/responses.d.ts +2 -2
- package/dist/chat_models/responses.d.ts.map +1 -1
- package/dist/chat_models/responses.js +1 -1
- package/dist/live_search.d.cts +7 -8
- package/dist/live_search.d.cts.map +1 -1
- package/dist/live_search.d.ts +7 -8
- package/dist/live_search.d.ts.map +1 -1
- package/dist/tools/code_execution.d.cts +3 -4
- package/dist/tools/code_execution.d.cts.map +1 -1
- package/dist/tools/code_execution.d.ts +3 -4
- package/dist/tools/code_execution.d.ts.map +1 -1
- package/dist/tools/collections_search.d.cts +4 -5
- package/dist/tools/collections_search.d.cts.map +1 -1
- package/dist/tools/collections_search.d.ts +4 -5
- package/dist/tools/collections_search.d.ts.map +1 -1
- package/dist/tools/index.d.cts +1 -2
- package/dist/tools/index.d.cts.map +1 -1
- package/dist/tools/index.d.ts +1 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/live_search.d.cts +10 -11
- package/dist/tools/live_search.d.cts.map +1 -1
- package/dist/tools/live_search.d.ts +10 -11
- package/dist/tools/live_search.d.ts.map +1 -1
- package/dist/tools/web_search.d.cts +4 -5
- package/dist/tools/web_search.d.cts.map +1 -1
- package/dist/tools/web_search.d.ts +4 -5
- package/dist/tools/web_search.d.ts.map +1 -1
- package/dist/tools/x_search.d.cts +4 -5
- package/dist/tools/x_search.d.cts.map +1 -1
- package/dist/tools/x_search.d.ts +4 -5
- package/dist/tools/x_search.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* xAI Web Search tool type constant.
|
|
4
4
|
*/
|
|
5
|
-
declare const XAI_WEB_SEARCH_TOOL_TYPE = "web_search";
|
|
5
|
+
export declare const XAI_WEB_SEARCH_TOOL_TYPE = "web_search";
|
|
6
6
|
/**
|
|
7
7
|
* xAI's built-in web search tool interface.
|
|
8
8
|
* Enables the model to search the web and browse pages for real-time information.
|
|
9
9
|
*
|
|
10
10
|
* This tool is part of xAI's agentic tool calling API.
|
|
11
11
|
*/
|
|
12
|
-
interface XAIWebSearchTool {
|
|
12
|
+
export interface XAIWebSearchTool {
|
|
13
13
|
/**
|
|
14
14
|
* The type of the tool. Must be "web_search".
|
|
15
15
|
*/
|
|
@@ -35,7 +35,7 @@ interface XAIWebSearchTool {
|
|
|
35
35
|
* All fields are camel-cased for the TypeScript API and are mapped to the
|
|
36
36
|
* corresponding snake_case fields in the API request.
|
|
37
37
|
*/
|
|
38
|
-
interface XAIWebSearchToolOptions {
|
|
38
|
+
export interface XAIWebSearchToolOptions {
|
|
39
39
|
/**
|
|
40
40
|
* Domains to exclusively include in the search (max 5).
|
|
41
41
|
* Cannot be used together with `excludedDomains`.
|
|
@@ -98,7 +98,6 @@ interface XAIWebSearchToolOptions {
|
|
|
98
98
|
* });
|
|
99
99
|
* ```
|
|
100
100
|
*/
|
|
101
|
-
declare function xaiWebSearch(options?: XAIWebSearchToolOptions): XAIWebSearchTool;
|
|
101
|
+
export declare function xaiWebSearch(options?: XAIWebSearchToolOptions): XAIWebSearchTool;
|
|
102
102
|
//#endregion
|
|
103
|
-
export { XAIWebSearchTool, XAIWebSearchToolOptions, XAI_WEB_SEARCH_TOOL_TYPE, xaiWebSearch };
|
|
104
103
|
//# sourceMappingURL=web_search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web_search.d.ts","names":[],"sources":["../../src/tools/web_search.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"web_search.d.ts","names":[],"sources":["../../src/tools/web_search.ts"],"mappings":";;;;qBAGa;;;;;;;iBAQI;;;;EAIf,aAAa;;;;;EAKb;;;;;EAKA;;;;;EAKA;;;;;;;iBAQe;;;;;;;EAOf;;;;;;;EAOA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA0Cc,aACd,UAAS,0BACR"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* xAI X Search tool type constant.
|
|
4
4
|
*/
|
|
5
|
-
declare const XAI_X_SEARCH_TOOL_TYPE = "x_search";
|
|
5
|
+
export declare const XAI_X_SEARCH_TOOL_TYPE = "x_search";
|
|
6
6
|
/**
|
|
7
7
|
* xAI's built-in X (formerly Twitter) search tool interface.
|
|
8
8
|
* Enables the model to perform keyword search, semantic search, user search,
|
|
@@ -10,7 +10,7 @@ declare const XAI_X_SEARCH_TOOL_TYPE = "x_search";
|
|
|
10
10
|
*
|
|
11
11
|
* This tool is part of xAI's agentic tool calling API.
|
|
12
12
|
*/
|
|
13
|
-
interface XAIXSearchTool {
|
|
13
|
+
export interface XAIXSearchTool {
|
|
14
14
|
/**
|
|
15
15
|
* The type of the tool. Must be "x_search".
|
|
16
16
|
*/
|
|
@@ -51,7 +51,7 @@ interface XAIXSearchTool {
|
|
|
51
51
|
* All fields are camel-cased for the TypeScript API and are mapped to the
|
|
52
52
|
* corresponding snake_case fields in the API request.
|
|
53
53
|
*/
|
|
54
|
-
interface XAIXSearchToolOptions {
|
|
54
|
+
export interface XAIXSearchToolOptions {
|
|
55
55
|
/**
|
|
56
56
|
* X handles to exclusively include in the search (max 10).
|
|
57
57
|
* Cannot be used together with `excludedXHandles`.
|
|
@@ -139,7 +139,6 @@ interface XAIXSearchToolOptions {
|
|
|
139
139
|
* });
|
|
140
140
|
* ```
|
|
141
141
|
*/
|
|
142
|
-
declare function xaiXSearch(options?: XAIXSearchToolOptions): XAIXSearchTool;
|
|
142
|
+
export declare function xaiXSearch(options?: XAIXSearchToolOptions): XAIXSearchTool;
|
|
143
143
|
//#endregion
|
|
144
|
-
export { XAIXSearchTool, XAIXSearchToolOptions, XAI_X_SEARCH_TOOL_TYPE, xaiXSearch };
|
|
145
144
|
//# sourceMappingURL=x_search.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x_search.d.cts","names":[],"sources":["../../src/tools/x_search.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"x_search.d.cts","names":[],"sources":["../../src/tools/x_search.ts"],"mappings":";;;;qBAGa;;;;;;;;iBASI;;;;EAIf,aAAa;;;;;EAKb;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;;;iBAQe;;;;;;;EAOf;;;;;;;EAOA;;;;;;;EAOA;;;;;;;EAOA;;;;;;;;EAQA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6Cc,WACd,UAAS,wBACR"}
|
package/dist/tools/x_search.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* xAI X Search tool type constant.
|
|
4
4
|
*/
|
|
5
|
-
declare const XAI_X_SEARCH_TOOL_TYPE = "x_search";
|
|
5
|
+
export declare const XAI_X_SEARCH_TOOL_TYPE = "x_search";
|
|
6
6
|
/**
|
|
7
7
|
* xAI's built-in X (formerly Twitter) search tool interface.
|
|
8
8
|
* Enables the model to perform keyword search, semantic search, user search,
|
|
@@ -10,7 +10,7 @@ declare const XAI_X_SEARCH_TOOL_TYPE = "x_search";
|
|
|
10
10
|
*
|
|
11
11
|
* This tool is part of xAI's agentic tool calling API.
|
|
12
12
|
*/
|
|
13
|
-
interface XAIXSearchTool {
|
|
13
|
+
export interface XAIXSearchTool {
|
|
14
14
|
/**
|
|
15
15
|
* The type of the tool. Must be "x_search".
|
|
16
16
|
*/
|
|
@@ -51,7 +51,7 @@ interface XAIXSearchTool {
|
|
|
51
51
|
* All fields are camel-cased for the TypeScript API and are mapped to the
|
|
52
52
|
* corresponding snake_case fields in the API request.
|
|
53
53
|
*/
|
|
54
|
-
interface XAIXSearchToolOptions {
|
|
54
|
+
export interface XAIXSearchToolOptions {
|
|
55
55
|
/**
|
|
56
56
|
* X handles to exclusively include in the search (max 10).
|
|
57
57
|
* Cannot be used together with `excludedXHandles`.
|
|
@@ -139,7 +139,6 @@ interface XAIXSearchToolOptions {
|
|
|
139
139
|
* });
|
|
140
140
|
* ```
|
|
141
141
|
*/
|
|
142
|
-
declare function xaiXSearch(options?: XAIXSearchToolOptions): XAIXSearchTool;
|
|
142
|
+
export declare function xaiXSearch(options?: XAIXSearchToolOptions): XAIXSearchTool;
|
|
143
143
|
//#endregion
|
|
144
|
-
export { XAIXSearchTool, XAIXSearchToolOptions, XAI_X_SEARCH_TOOL_TYPE, xaiXSearch };
|
|
145
144
|
//# sourceMappingURL=x_search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"x_search.d.ts","names":[],"sources":["../../src/tools/x_search.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"x_search.d.ts","names":[],"sources":["../../src/tools/x_search.ts"],"mappings":";;;;qBAGa;;;;;;;;iBASI;;;;EAIf,aAAa;;;;;EAKb;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;EAKA;;;;;;;iBAQe;;;;;;;EAOf;;;;;;;EAOA;;;;;;;EAOA;;;;;;;EAOA;;;;;;;;EAQA;;;;;;;;EAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA6Cc,WACd,UAAS,wBACR"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/xai",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.18",
|
|
4
4
|
"description": "xAI integration for LangChain.js",
|
|
5
5
|
"author": "LangChain",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,21 +14,21 @@
|
|
|
14
14
|
},
|
|
15
15
|
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/providers/langchain-xai/",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@langchain/openai": "1.6.
|
|
17
|
+
"@langchain/openai": "1.6.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@langchain/core": "^1.0.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@tsconfig/recommended": "^1.0.3",
|
|
24
|
-
"@vitest/coverage-v8": "^
|
|
24
|
+
"@vitest/coverage-v8": "^5.0.2",
|
|
25
25
|
"dotenv": "^17.4.2",
|
|
26
26
|
"dpdm": "^4.3.0",
|
|
27
27
|
"typescript": "~7.0.2",
|
|
28
|
-
"vitest": "^
|
|
28
|
+
"vitest": "^5.0.2",
|
|
29
29
|
"zod": "^3.25.76",
|
|
30
|
-
"@langchain/core": "^1.2.
|
|
31
|
-
"@langchain/openai": "^1.6.
|
|
30
|
+
"@langchain/core": "^1.2.20",
|
|
31
|
+
"@langchain/openai": "^1.6.3",
|
|
32
32
|
"@langchain/standard-tests": "0.0.23",
|
|
33
33
|
"@langchain/tsconfig": "0.0.1"
|
|
34
34
|
},
|