@letta-ai/letta-client 1.2.0 → 1.3.2
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 +43 -0
- package/README.md +40 -79
- package/client.d.mts +13 -7
- package/client.d.mts.map +1 -1
- package/client.d.ts +13 -7
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +18 -13
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +18 -13
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +1 -1
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +33 -1
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +33 -1
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/tools.d.mts +59 -1
- package/resources/agents/tools.d.mts.map +1 -1
- package/resources/agents/tools.d.ts +59 -1
- package/resources/agents/tools.d.ts.map +1 -1
- package/resources/agents/tools.js +10 -0
- package/resources/agents/tools.js.map +1 -1
- package/resources/agents/tools.mjs +10 -0
- package/resources/agents/tools.mjs.map +1 -1
- package/resources/archives/archives.d.mts +2 -2
- package/resources/archives/archives.d.mts.map +1 -1
- package/resources/archives/archives.d.ts +2 -2
- package/resources/archives/archives.d.ts.map +1 -1
- package/resources/archives/archives.js.map +1 -1
- package/resources/archives/archives.mjs.map +1 -1
- package/resources/archives/index.d.mts +1 -1
- package/resources/archives/index.d.mts.map +1 -1
- package/resources/archives/index.d.ts +1 -1
- package/resources/archives/index.d.ts.map +1 -1
- package/resources/archives/index.js.map +1 -1
- package/resources/archives/index.mjs +1 -1
- package/resources/archives/index.mjs.map +1 -1
- package/resources/archives/passages.d.mts +3 -71
- package/resources/archives/passages.d.mts.map +1 -1
- package/resources/archives/passages.d.ts +3 -71
- package/resources/archives/passages.d.ts.map +1 -1
- package/resources/blocks/agents.d.mts +4 -4
- package/resources/blocks/agents.d.ts +4 -4
- package/resources/blocks/blocks.d.mts +9 -8
- package/resources/blocks/blocks.d.mts.map +1 -1
- package/resources/blocks/blocks.d.ts +9 -8
- package/resources/blocks/blocks.d.ts.map +1 -1
- package/resources/blocks/blocks.js.map +1 -1
- package/resources/blocks/blocks.mjs.map +1 -1
- package/resources/identities/identities.d.mts +4 -0
- package/resources/identities/identities.d.mts.map +1 -1
- package/resources/identities/identities.d.ts +4 -0
- package/resources/identities/identities.d.ts.map +1 -1
- package/resources/identities/identities.js.map +1 -1
- package/resources/identities/identities.mjs.map +1 -1
- package/resources/index.d.mts +5 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/index.d.mts +1 -1
- package/resources/mcp-servers/index.d.mts.map +1 -1
- package/resources/mcp-servers/index.d.ts +1 -1
- package/resources/mcp-servers/index.d.ts.map +1 -1
- package/resources/mcp-servers/index.js.map +1 -1
- package/resources/mcp-servers/index.mjs.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.mts +1 -41
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.ts +1 -41
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -1
- package/resources/mcp-servers/mcp-servers.js.map +1 -1
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -1
- package/resources/mcp-servers/tools.d.mts +4 -4
- package/resources/mcp-servers/tools.d.mts.map +1 -1
- package/resources/mcp-servers/tools.d.ts +4 -4
- package/resources/mcp-servers/tools.d.ts.map +1 -1
- package/resources/mcp-servers/tools.js +1 -1
- package/resources/mcp-servers/tools.mjs +1 -1
- package/resources/messages.d.mts +114 -0
- package/resources/messages.d.mts.map +1 -0
- package/resources/messages.d.ts +114 -0
- package/resources/messages.d.ts.map +1 -0
- package/resources/messages.js +24 -0
- package/resources/messages.js.map +1 -0
- package/resources/messages.mjs +20 -0
- package/resources/messages.mjs.map +1 -0
- package/resources/models/models.d.mts +11 -0
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +11 -0
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/passages.d.mts +150 -0
- package/resources/passages.d.mts.map +1 -0
- package/resources/passages.d.ts +150 -0
- package/resources/passages.d.ts.map +1 -0
- package/resources/passages.js +25 -0
- package/resources/passages.js.map +1 -0
- package/resources/passages.mjs +21 -0
- package/resources/passages.mjs.map +1 -0
- package/resources/runs/usage.d.mts +4 -2
- package/resources/runs/usage.d.mts.map +1 -1
- package/resources/runs/usage.d.ts +4 -2
- package/resources/runs/usage.d.ts.map +1 -1
- package/resources/steps/steps.d.mts +8 -1
- package/resources/steps/steps.d.mts.map +1 -1
- package/resources/steps/steps.d.ts +8 -1
- package/resources/steps/steps.d.ts.map +1 -1
- package/resources/steps/steps.js.map +1 -1
- package/resources/steps/steps.mjs.map +1 -1
- package/resources/templates/index.d.mts +1 -1
- package/resources/templates/index.d.mts.map +1 -1
- package/resources/templates/index.d.ts +1 -1
- package/resources/templates/index.d.ts.map +1 -1
- package/resources/templates/index.js.map +1 -1
- package/resources/templates/index.mjs +1 -1
- package/resources/templates/index.mjs.map +1 -1
- package/resources/templates/templates.d.mts +99 -0
- package/resources/templates/templates.d.mts.map +1 -1
- package/resources/templates/templates.d.ts +99 -0
- package/resources/templates/templates.d.ts.map +1 -1
- package/resources/templates/templates.js +19 -0
- package/resources/templates/templates.js.map +1 -1
- package/resources/templates/templates.mjs +19 -0
- package/resources/templates/templates.mjs.map +1 -1
- package/resources/tools.d.mts +83 -6
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +83 -6
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +11 -6
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +11 -6
- package/resources/tools.mjs.map +1 -1
- package/src/client.ts +58 -9
- package/src/resources/agents/agents.ts +30 -12
- package/src/resources/agents/index.ts +3 -0
- package/src/resources/agents/messages.ts +39 -1
- package/src/resources/agents/tools.ts +70 -0
- package/src/resources/archives/archives.ts +1 -2
- package/src/resources/archives/index.ts +1 -6
- package/src/resources/archives/passages.ts +3 -88
- package/src/resources/blocks/agents.ts +4 -4
- package/src/resources/blocks/blocks.ts +9 -8
- package/src/resources/identities/identities.ts +4 -0
- package/src/resources/index.ts +23 -4
- package/src/resources/mcp-servers/index.ts +0 -2
- package/src/resources/mcp-servers/mcp-servers.ts +0 -47
- package/src/resources/mcp-servers/tools.ts +4 -4
- package/src/resources/messages.ts +165 -0
- package/src/resources/models/models.ts +21 -0
- package/src/resources/passages.ts +182 -0
- package/src/resources/runs/usage.ts +6 -2
- package/src/resources/steps/steps.ts +7 -1
- package/src/resources/templates/index.ts +9 -1
- package/src/resources/templates/templates.ts +143 -0
- package/src/resources/tools.ts +104 -9
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/tools.js
CHANGED
|
@@ -37,16 +37,21 @@ class Tools extends resource_1.APIResource {
|
|
|
37
37
|
return this._client.delete((0, path_1.path) `/v1/tools/${toolID}`, options);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Search tools using semantic search.
|
|
41
|
+
*
|
|
42
|
+
* Requires tool embedding to be enabled (embed_tools=True). Uses vector search,
|
|
43
|
+
* full-text search, or hybrid mode to find tools matching the query.
|
|
44
|
+
*
|
|
45
|
+
* Returns tools ranked by relevance with their search scores.
|
|
41
46
|
*/
|
|
42
|
-
|
|
43
|
-
return this._client.
|
|
47
|
+
search(body, options) {
|
|
48
|
+
return this._client.post('/v1/tools/search', { body, ...options });
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
|
-
*
|
|
51
|
+
* Create or update a tool
|
|
47
52
|
*/
|
|
48
|
-
|
|
49
|
-
return this._client.
|
|
53
|
+
upsert(body, options) {
|
|
54
|
+
return this._client.put('/v1/tools/', { body, ...options });
|
|
50
55
|
}
|
|
51
56
|
}
|
|
52
57
|
exports.Tools = Tools;
|
package/resources/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAkF;AAElF,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,sBAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAkF;AAElF,oDAA8C;AAE9C,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,sBAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AAzDD,sBAyDC"}
|
package/resources/tools.mjs
CHANGED
|
@@ -34,16 +34,21 @@ export class Tools extends APIResource {
|
|
|
34
34
|
return this._client.delete(path `/v1/tools/${toolID}`, options);
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Search tools using semantic search.
|
|
38
|
+
*
|
|
39
|
+
* Requires tool embedding to be enabled (embed_tools=True). Uses vector search,
|
|
40
|
+
* full-text search, or hybrid mode to find tools matching the query.
|
|
41
|
+
*
|
|
42
|
+
* Returns tools ranked by relevance with their search scores.
|
|
38
43
|
*/
|
|
39
|
-
|
|
40
|
-
return this._client.
|
|
44
|
+
search(body, options) {
|
|
45
|
+
return this._client.post('/v1/tools/search', { body, ...options });
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
|
-
*
|
|
48
|
+
* Create or update a tool
|
|
44
49
|
*/
|
|
45
|
-
|
|
46
|
-
return this._client.
|
|
50
|
+
upsert(body, options) {
|
|
51
|
+
return this._client.put('/v1/tools/', { body, ...options });
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
54
|
//# sourceMappingURL=tools.mjs.map
|
package/resources/tools.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,SAAS,EAAqC;OAEhD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,SAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"tools.mjs","sourceRoot":"","sources":["../src/resources/tools.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,SAAS,EAAqC;OAEhD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,IAAsB,EAAE,OAAwB;QACrE,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,SAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAc,EAAE,OAAwB;QAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAAwB;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -38,6 +38,16 @@ import {
|
|
|
38
38
|
AccessTokenListResponse,
|
|
39
39
|
AccessTokens,
|
|
40
40
|
} from './resources/access-tokens';
|
|
41
|
+
import {
|
|
42
|
+
MessageListParams,
|
|
43
|
+
MessageListResponse,
|
|
44
|
+
MessageSearchParams,
|
|
45
|
+
MessageSearchRequest,
|
|
46
|
+
MessageSearchResponse,
|
|
47
|
+
MessageSearchResult,
|
|
48
|
+
Messages,
|
|
49
|
+
} from './resources/messages';
|
|
50
|
+
import { Passage, PassageSearchParams, PassageSearchResponse, Passages } from './resources/passages';
|
|
41
51
|
import { TagListParams, TagListResponse, Tags } from './resources/tags';
|
|
42
52
|
import {
|
|
43
53
|
NpmRequirement,
|
|
@@ -48,9 +58,12 @@ import {
|
|
|
48
58
|
ToolDeleteResponse,
|
|
49
59
|
ToolListParams,
|
|
50
60
|
ToolReturnMessage,
|
|
61
|
+
ToolSearchParams,
|
|
62
|
+
ToolSearchRequest,
|
|
63
|
+
ToolSearchResponse,
|
|
64
|
+
ToolSearchResult,
|
|
51
65
|
ToolType,
|
|
52
66
|
ToolUpdateParams,
|
|
53
|
-
ToolUpsertBaseToolsResponse,
|
|
54
67
|
ToolUpsertParams,
|
|
55
68
|
Tools,
|
|
56
69
|
ToolsArrayPage,
|
|
@@ -171,11 +184,9 @@ import {
|
|
|
171
184
|
McpServerUpdateParams,
|
|
172
185
|
McpServerUpdateResponse,
|
|
173
186
|
McpServers,
|
|
174
|
-
McpToolExecuteRequest,
|
|
175
187
|
SseMcpServer,
|
|
176
188
|
StdioMcpServer,
|
|
177
189
|
StreamableHTTPMcpServer,
|
|
178
|
-
ToolExecutionResult,
|
|
179
190
|
UpdateSseMcpServer,
|
|
180
191
|
UpdateStdioMcpServer,
|
|
181
192
|
UpdateStreamableHTTPMcpServer,
|
|
@@ -193,7 +204,15 @@ import {
|
|
|
193
204
|
} from './resources/models/models';
|
|
194
205
|
import { Job, RunListParams, Runs, StopReasonType } from './resources/runs/runs';
|
|
195
206
|
import { ProviderTrace, Step, StepListParams, Steps, StepsArrayPage } from './resources/steps/steps';
|
|
196
|
-
import {
|
|
207
|
+
import {
|
|
208
|
+
TemplateCreateParams,
|
|
209
|
+
TemplateCreateResponse,
|
|
210
|
+
TemplateDeleteParams,
|
|
211
|
+
TemplateDeleteResponse,
|
|
212
|
+
TemplateUpdateParams,
|
|
213
|
+
TemplateUpdateResponse,
|
|
214
|
+
Templates,
|
|
215
|
+
} from './resources/templates/templates';
|
|
197
216
|
import { type Fetch } from './internal/builtin-types';
|
|
198
217
|
import { HeadersLike, NullableHeaders, buildHeaders } from './internal/headers';
|
|
199
218
|
import { FinalRequestOptions, RequestOptions } from './internal/request-options';
|
|
@@ -315,7 +334,7 @@ export class Letta {
|
|
|
315
334
|
baseURL: string;
|
|
316
335
|
maxRetries: number;
|
|
317
336
|
timeout: number;
|
|
318
|
-
logger: Logger
|
|
337
|
+
logger: Logger;
|
|
319
338
|
logLevel: LogLevel | undefined;
|
|
320
339
|
fetchOptions: MergedRequestInit | undefined;
|
|
321
340
|
|
|
@@ -956,6 +975,8 @@ export class Letta {
|
|
|
956
975
|
tags: API.Tags = new API.Tags(this);
|
|
957
976
|
identities: API.Identities = new API.Identities(this);
|
|
958
977
|
groups: API.Groups = new API.Groups(this);
|
|
978
|
+
messages: API.Messages = new API.Messages(this);
|
|
979
|
+
passages: API.Passages = new API.Passages(this);
|
|
959
980
|
batches: API.Batches = new API.Batches(this);
|
|
960
981
|
accessTokens: API.AccessTokens = new API.AccessTokens(this);
|
|
961
982
|
}
|
|
@@ -973,6 +994,8 @@ Letta.Templates = Templates;
|
|
|
973
994
|
Letta.Tags = Tags;
|
|
974
995
|
Letta.Identities = Identities;
|
|
975
996
|
Letta.Groups = Groups;
|
|
997
|
+
Letta.Messages = Messages;
|
|
998
|
+
Letta.Passages = Passages;
|
|
976
999
|
Letta.Batches = Batches;
|
|
977
1000
|
Letta.AccessTokens = AccessTokens;
|
|
978
1001
|
|
|
@@ -1041,13 +1064,16 @@ export declare namespace Letta {
|
|
|
1041
1064
|
type Tool as Tool,
|
|
1042
1065
|
type ToolCreate as ToolCreate,
|
|
1043
1066
|
type ToolReturnMessage as ToolReturnMessage,
|
|
1067
|
+
type ToolSearchRequest as ToolSearchRequest,
|
|
1068
|
+
type ToolSearchResult as ToolSearchResult,
|
|
1044
1069
|
type ToolType as ToolType,
|
|
1045
1070
|
type ToolDeleteResponse as ToolDeleteResponse,
|
|
1046
|
-
type
|
|
1071
|
+
type ToolSearchResponse as ToolSearchResponse,
|
|
1047
1072
|
type ToolsArrayPage as ToolsArrayPage,
|
|
1048
1073
|
type ToolCreateParams as ToolCreateParams,
|
|
1049
1074
|
type ToolUpdateParams as ToolUpdateParams,
|
|
1050
1075
|
type ToolListParams as ToolListParams,
|
|
1076
|
+
type ToolSearchParams as ToolSearchParams,
|
|
1051
1077
|
type ToolUpsertParams as ToolUpsertParams,
|
|
1052
1078
|
};
|
|
1053
1079
|
|
|
@@ -1099,11 +1125,9 @@ export declare namespace Letta {
|
|
|
1099
1125
|
type CreateSseMcpServer as CreateSseMcpServer,
|
|
1100
1126
|
type CreateStdioMcpServer as CreateStdioMcpServer,
|
|
1101
1127
|
type CreateStreamableHTTPMcpServer as CreateStreamableHTTPMcpServer,
|
|
1102
|
-
type McpToolExecuteRequest as McpToolExecuteRequest,
|
|
1103
1128
|
type SseMcpServer as SseMcpServer,
|
|
1104
1129
|
type StdioMcpServer as StdioMcpServer,
|
|
1105
1130
|
type StreamableHTTPMcpServer as StreamableHTTPMcpServer,
|
|
1106
|
-
type ToolExecutionResult as ToolExecutionResult,
|
|
1107
1131
|
type UpdateSseMcpServer as UpdateSseMcpServer,
|
|
1108
1132
|
type UpdateStdioMcpServer as UpdateStdioMcpServer,
|
|
1109
1133
|
type UpdateStreamableHTTPMcpServer as UpdateStreamableHTTPMcpServer,
|
|
@@ -1132,7 +1156,15 @@ export declare namespace Letta {
|
|
|
1132
1156
|
type StepListParams as StepListParams,
|
|
1133
1157
|
};
|
|
1134
1158
|
|
|
1135
|
-
export {
|
|
1159
|
+
export {
|
|
1160
|
+
Templates as Templates,
|
|
1161
|
+
type TemplateCreateResponse as TemplateCreateResponse,
|
|
1162
|
+
type TemplateUpdateResponse as TemplateUpdateResponse,
|
|
1163
|
+
type TemplateDeleteResponse as TemplateDeleteResponse,
|
|
1164
|
+
type TemplateCreateParams as TemplateCreateParams,
|
|
1165
|
+
type TemplateUpdateParams as TemplateUpdateParams,
|
|
1166
|
+
type TemplateDeleteParams as TemplateDeleteParams,
|
|
1167
|
+
};
|
|
1136
1168
|
|
|
1137
1169
|
export { Tags as Tags, type TagListResponse as TagListResponse, type TagListParams as TagListParams };
|
|
1138
1170
|
|
|
@@ -1165,6 +1197,23 @@ export declare namespace Letta {
|
|
|
1165
1197
|
type GroupListParams as GroupListParams,
|
|
1166
1198
|
};
|
|
1167
1199
|
|
|
1200
|
+
export {
|
|
1201
|
+
Messages as Messages,
|
|
1202
|
+
type MessageSearchRequest as MessageSearchRequest,
|
|
1203
|
+
type MessageSearchResult as MessageSearchResult,
|
|
1204
|
+
type MessageListResponse as MessageListResponse,
|
|
1205
|
+
type MessageSearchResponse as MessageSearchResponse,
|
|
1206
|
+
type MessageListParams as MessageListParams,
|
|
1207
|
+
type MessageSearchParams as MessageSearchParams,
|
|
1208
|
+
};
|
|
1209
|
+
|
|
1210
|
+
export {
|
|
1211
|
+
Passages as Passages,
|
|
1212
|
+
type Passage as Passage,
|
|
1213
|
+
type PassageSearchResponse as PassageSearchResponse,
|
|
1214
|
+
type PassageSearchParams as PassageSearchParams,
|
|
1215
|
+
};
|
|
1216
|
+
|
|
1168
1217
|
export {
|
|
1169
1218
|
Batches as Batches,
|
|
1170
1219
|
type BatchJob as BatchJob,
|
|
@@ -107,7 +107,16 @@ import {
|
|
|
107
107
|
UserMessage,
|
|
108
108
|
} from './messages';
|
|
109
109
|
import * as AgentsToolsAPI from './tools';
|
|
110
|
-
import {
|
|
110
|
+
import {
|
|
111
|
+
ToolAttachParams,
|
|
112
|
+
ToolDetachParams,
|
|
113
|
+
ToolExecuteRequest,
|
|
114
|
+
ToolExecutionResult,
|
|
115
|
+
ToolListParams,
|
|
116
|
+
ToolRunParams,
|
|
117
|
+
ToolUpdateApprovalParams,
|
|
118
|
+
Tools,
|
|
119
|
+
} from './tools';
|
|
111
120
|
import * as ArchivesArchivesAPI from '../archives/archives';
|
|
112
121
|
import * as BlocksBlocksAPI from '../blocks/blocks';
|
|
113
122
|
import * as GroupsGroupsAPI from '../groups/groups';
|
|
@@ -761,6 +770,11 @@ export interface AnthropicModelSettings {
|
|
|
761
770
|
*/
|
|
762
771
|
provider_type?: 'anthropic';
|
|
763
772
|
|
|
773
|
+
/**
|
|
774
|
+
* The response format for the model.
|
|
775
|
+
*/
|
|
776
|
+
response_format?: TextResponseFormat | JsonSchemaResponseFormat | JsonObjectResponseFormat | null;
|
|
777
|
+
|
|
764
778
|
/**
|
|
765
779
|
* The temperature of the model.
|
|
766
780
|
*/
|
|
@@ -1663,7 +1677,8 @@ export interface AgentCreateParams {
|
|
|
1663
1677
|
reasoning?: boolean | null;
|
|
1664
1678
|
|
|
1665
1679
|
/**
|
|
1666
|
-
*
|
|
1680
|
+
* @deprecated Deprecated: Use `model_settings` field to configure response format
|
|
1681
|
+
* instead. The response format for the agent.
|
|
1667
1682
|
*/
|
|
1668
1683
|
response_format?: TextResponseFormat | JsonSchemaResponseFormat | JsonObjectResponseFormat | null;
|
|
1669
1684
|
|
|
@@ -1752,10 +1767,10 @@ export interface AgentRetrieveParams {
|
|
|
1752
1767
|
>;
|
|
1753
1768
|
|
|
1754
1769
|
/**
|
|
1755
|
-
* Specify which relational fields (e.g., 'tools', 'sources', 'memory')
|
|
1756
|
-
* in the response. If not provided, all relationships are loaded by
|
|
1757
|
-
* this can optimize performance by reducing unnecessary joins.This
|
|
1758
|
-
* parameter, and no longer supported after 1.0.0 SDK versions.
|
|
1770
|
+
* @deprecated Specify which relational fields (e.g., 'tools', 'sources', 'memory')
|
|
1771
|
+
* to include in the response. If not provided, all relationships are loaded by
|
|
1772
|
+
* default. Using this can optimize performance by reducing unnecessary joins.This
|
|
1773
|
+
* is a legacy parameter, and no longer supported after 1.0.0 SDK versions.
|
|
1759
1774
|
*/
|
|
1760
1775
|
include_relationships?: Array<string> | null;
|
|
1761
1776
|
}
|
|
@@ -1915,8 +1930,8 @@ export interface AgentUpdateParams {
|
|
|
1915
1930
|
reasoning?: boolean | null;
|
|
1916
1931
|
|
|
1917
1932
|
/**
|
|
1918
|
-
* @deprecated Deprecated: Use `
|
|
1919
|
-
* The response format for the agent.
|
|
1933
|
+
* @deprecated Deprecated: Use `model_settings` field to configure response format
|
|
1934
|
+
* instead. The response format for the agent.
|
|
1920
1935
|
*/
|
|
1921
1936
|
response_format?: TextResponseFormat | JsonSchemaResponseFormat | JsonObjectResponseFormat | null;
|
|
1922
1937
|
|
|
@@ -2014,10 +2029,10 @@ export interface AgentListParams extends ArrayPageParams {
|
|
|
2014
2029
|
>;
|
|
2015
2030
|
|
|
2016
2031
|
/**
|
|
2017
|
-
* Specify which relational fields (e.g., 'tools', 'sources', 'memory')
|
|
2018
|
-
* in the response. If not provided, all relationships are loaded by
|
|
2019
|
-
* this can optimize performance by reducing unnecessary joins.This
|
|
2020
|
-
* parameter, and no longer supported after 1.0.0 SDK versions.
|
|
2032
|
+
* @deprecated Specify which relational fields (e.g., 'tools', 'sources', 'memory')
|
|
2033
|
+
* to include in the response. If not provided, all relationships are loaded by
|
|
2034
|
+
* default. Using this can optimize performance by reducing unnecessary joins.This
|
|
2035
|
+
* is a legacy parameter, and no longer supported after 1.0.0 SDK versions.
|
|
2021
2036
|
*/
|
|
2022
2037
|
include_relationships?: Array<string> | null;
|
|
2023
2038
|
|
|
@@ -2263,9 +2278,12 @@ export declare namespace Agents {
|
|
|
2263
2278
|
|
|
2264
2279
|
export {
|
|
2265
2280
|
Tools as Tools,
|
|
2281
|
+
type ToolExecuteRequest as ToolExecuteRequest,
|
|
2282
|
+
type ToolExecutionResult as ToolExecutionResult,
|
|
2266
2283
|
type ToolListParams as ToolListParams,
|
|
2267
2284
|
type ToolAttachParams as ToolAttachParams,
|
|
2268
2285
|
type ToolDetachParams as ToolDetachParams,
|
|
2286
|
+
type ToolRunParams as ToolRunParams,
|
|
2269
2287
|
type ToolUpdateApprovalParams as ToolUpdateApprovalParams,
|
|
2270
2288
|
};
|
|
2271
2289
|
|
|
@@ -140,8 +140,11 @@ export {
|
|
|
140
140
|
} from './messages';
|
|
141
141
|
export {
|
|
142
142
|
Tools,
|
|
143
|
+
type ToolExecuteRequest,
|
|
144
|
+
type ToolExecutionResult,
|
|
143
145
|
type ToolListParams,
|
|
144
146
|
type ToolAttachParams,
|
|
145
147
|
type ToolDetachParams,
|
|
148
|
+
type ToolRunParams,
|
|
146
149
|
type ToolUpdateApprovalParams,
|
|
147
150
|
} from './tools';
|
|
@@ -925,6 +925,17 @@ export namespace LettaResponse {
|
|
|
925
925
|
* The usage statistics of the agent.
|
|
926
926
|
*/
|
|
927
927
|
export interface Usage {
|
|
928
|
+
/**
|
|
929
|
+
* The number of input tokens written to cache (Anthropic only). None if not
|
|
930
|
+
* reported by provider.
|
|
931
|
+
*/
|
|
932
|
+
cache_write_tokens?: number | null;
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* The number of input tokens served from cache. None if not reported by provider.
|
|
936
|
+
*/
|
|
937
|
+
cached_input_tokens?: number | null;
|
|
938
|
+
|
|
928
939
|
/**
|
|
929
940
|
* The number of tokens generated by the agent.
|
|
930
941
|
*/
|
|
@@ -937,6 +948,12 @@ export namespace LettaResponse {
|
|
|
937
948
|
*/
|
|
938
949
|
prompt_tokens?: number;
|
|
939
950
|
|
|
951
|
+
/**
|
|
952
|
+
* The number of reasoning/thinking tokens generated. None if not reported by
|
|
953
|
+
* provider.
|
|
954
|
+
*/
|
|
955
|
+
reasoning_tokens?: number | null;
|
|
956
|
+
|
|
940
957
|
/**
|
|
941
958
|
* The background task run IDs associated with the agent interaction
|
|
942
959
|
*/
|
|
@@ -1164,9 +1181,24 @@ export namespace LettaStreamingResponse {
|
|
|
1164
1181
|
* Attributes: completion_tokens (int): The number of tokens generated by the
|
|
1165
1182
|
* agent. prompt_tokens (int): The number of tokens in the prompt. total_tokens
|
|
1166
1183
|
* (int): The total number of tokens processed by the agent. step_count (int): The
|
|
1167
|
-
* number of steps taken by the agent.
|
|
1184
|
+
* number of steps taken by the agent. cached_input_tokens (Optional[int]): The
|
|
1185
|
+
* number of input tokens served from cache. None if not reported.
|
|
1186
|
+
* cache_write_tokens (Optional[int]): The number of input tokens written to cache.
|
|
1187
|
+
* None if not reported. reasoning_tokens (Optional[int]): The number of
|
|
1188
|
+
* reasoning/thinking tokens generated. None if not reported.
|
|
1168
1189
|
*/
|
|
1169
1190
|
export interface LettaUsageStatistics {
|
|
1191
|
+
/**
|
|
1192
|
+
* The number of input tokens written to cache (Anthropic only). None if not
|
|
1193
|
+
* reported by provider.
|
|
1194
|
+
*/
|
|
1195
|
+
cache_write_tokens?: number | null;
|
|
1196
|
+
|
|
1197
|
+
/**
|
|
1198
|
+
* The number of input tokens served from cache. None if not reported by provider.
|
|
1199
|
+
*/
|
|
1200
|
+
cached_input_tokens?: number | null;
|
|
1201
|
+
|
|
1170
1202
|
/**
|
|
1171
1203
|
* The number of tokens generated by the agent.
|
|
1172
1204
|
*/
|
|
@@ -1179,6 +1211,12 @@ export namespace LettaStreamingResponse {
|
|
|
1179
1211
|
*/
|
|
1180
1212
|
prompt_tokens?: number;
|
|
1181
1213
|
|
|
1214
|
+
/**
|
|
1215
|
+
* The number of reasoning/thinking tokens generated. None if not reported by
|
|
1216
|
+
* provider.
|
|
1217
|
+
*/
|
|
1218
|
+
reasoning_tokens?: number | null;
|
|
1219
|
+
|
|
1182
1220
|
/**
|
|
1183
1221
|
* The background task run IDs associated with the agent interaction
|
|
1184
1222
|
*/
|
|
@@ -48,6 +48,17 @@ export class Tools extends APIResource {
|
|
|
48
48
|
return this._client.patch(path`/v1/agents/${agent_id}/tools/detach/${toolID}`, options);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Trigger a tool by name on a specific agent, providing the necessary arguments.
|
|
53
|
+
*
|
|
54
|
+
* This endpoint executes a tool that is attached to the agent, using the agent's
|
|
55
|
+
* state and environment variables for execution context.
|
|
56
|
+
*/
|
|
57
|
+
run(toolName: string, params: ToolRunParams, options?: RequestOptions): APIPromise<ToolExecutionResult> {
|
|
58
|
+
const { agent_id, ...body } = params;
|
|
59
|
+
return this._client.post(path`/v1/agents/${agent_id}/tools/${toolName}/run`, { body, ...options });
|
|
60
|
+
}
|
|
61
|
+
|
|
51
62
|
/**
|
|
52
63
|
* Modify the approval requirement for a tool attached to an agent.
|
|
53
64
|
*
|
|
@@ -68,6 +79,50 @@ export class Tools extends APIResource {
|
|
|
68
79
|
}
|
|
69
80
|
}
|
|
70
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Request to execute a tool.
|
|
84
|
+
*/
|
|
85
|
+
export interface ToolExecuteRequest {
|
|
86
|
+
/**
|
|
87
|
+
* Arguments to pass to the tool
|
|
88
|
+
*/
|
|
89
|
+
args?: { [key: string]: unknown };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ToolExecutionResult {
|
|
93
|
+
/**
|
|
94
|
+
* The status of the tool execution and return object
|
|
95
|
+
*/
|
|
96
|
+
status: 'success' | 'error';
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated Representation of an agent's state. This is the state of the agent
|
|
100
|
+
* at a given time, and is persisted in the DB backend. The state has all the
|
|
101
|
+
* information needed to recreate a persisted agent.
|
|
102
|
+
*/
|
|
103
|
+
agent_state?: AgentsAPI.AgentState | null;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The function return object
|
|
107
|
+
*/
|
|
108
|
+
func_return?: unknown;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The fingerprint of the config for the sandbox
|
|
112
|
+
*/
|
|
113
|
+
sandbox_config_fingerprint?: string | null;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Captured stderr from the function invocation
|
|
117
|
+
*/
|
|
118
|
+
stderr?: Array<string> | null;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Captured stdout (prints, logs) from function invocation
|
|
122
|
+
*/
|
|
123
|
+
stdout?: Array<string> | null;
|
|
124
|
+
}
|
|
125
|
+
|
|
71
126
|
export interface ToolListParams extends ArrayPageParams {}
|
|
72
127
|
|
|
73
128
|
export interface ToolAttachParams {
|
|
@@ -84,6 +139,18 @@ export interface ToolDetachParams {
|
|
|
84
139
|
agent_id: string;
|
|
85
140
|
}
|
|
86
141
|
|
|
142
|
+
export interface ToolRunParams {
|
|
143
|
+
/**
|
|
144
|
+
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
145
|
+
*/
|
|
146
|
+
agent_id: string;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Body param: Arguments to pass to the tool
|
|
150
|
+
*/
|
|
151
|
+
args?: { [key: string]: unknown };
|
|
152
|
+
}
|
|
153
|
+
|
|
87
154
|
export interface ToolUpdateApprovalParams {
|
|
88
155
|
/**
|
|
89
156
|
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
@@ -103,9 +170,12 @@ export interface ToolUpdateApprovalParams {
|
|
|
103
170
|
|
|
104
171
|
export declare namespace Tools {
|
|
105
172
|
export {
|
|
173
|
+
type ToolExecuteRequest as ToolExecuteRequest,
|
|
174
|
+
type ToolExecutionResult as ToolExecutionResult,
|
|
106
175
|
type ToolListParams as ToolListParams,
|
|
107
176
|
type ToolAttachParams as ToolAttachParams,
|
|
108
177
|
type ToolDetachParams as ToolDetachParams,
|
|
178
|
+
type ToolRunParams as ToolRunParams,
|
|
109
179
|
type ToolUpdateApprovalParams as ToolUpdateApprovalParams,
|
|
110
180
|
};
|
|
111
181
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as PassagesAPI from './passages';
|
|
5
|
-
import { PassageCreateParams,
|
|
5
|
+
import { PassageCreateParams, PassageDeleteParams, Passages } from './passages';
|
|
6
6
|
import * as ModelsAPI from '../models/models';
|
|
7
7
|
import { APIPromise } from '../../core/api-promise';
|
|
8
8
|
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
@@ -167,7 +167,6 @@ export declare namespace Archives {
|
|
|
167
167
|
|
|
168
168
|
export {
|
|
169
169
|
Passages as Passages,
|
|
170
|
-
type PassageCreateResponse as PassageCreateResponse,
|
|
171
170
|
type PassageCreateParams as PassageCreateParams,
|
|
172
171
|
type PassageDeleteParams as PassageDeleteParams,
|
|
173
172
|
};
|
|
@@ -9,9 +9,4 @@ export {
|
|
|
9
9
|
type ArchiveListParams,
|
|
10
10
|
type ArchivesArrayPage,
|
|
11
11
|
} from './archives';
|
|
12
|
-
export {
|
|
13
|
-
Passages,
|
|
14
|
-
type PassageCreateResponse,
|
|
15
|
-
type PassageCreateParams,
|
|
16
|
-
type PassageDeleteParams,
|
|
17
|
-
} from './passages';
|
|
12
|
+
export { Passages, type PassageCreateParams, type PassageDeleteParams } from './passages';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
|
-
import * as
|
|
4
|
+
import * as PassagesAPI from '../passages';
|
|
5
5
|
import { APIPromise } from '../../core/api-promise';
|
|
6
6
|
import { buildHeaders } from '../../internal/headers';
|
|
7
7
|
import { RequestOptions } from '../../internal/request-options';
|
|
@@ -17,7 +17,7 @@ export class Passages extends APIResource {
|
|
|
17
17
|
archiveID: string,
|
|
18
18
|
body: PassageCreateParams,
|
|
19
19
|
options?: RequestOptions,
|
|
20
|
-
): APIPromise<
|
|
20
|
+
): APIPromise<PassagesAPI.Passage> {
|
|
21
21
|
return this._client.post(path`/v1/archives/${archiveID}/passages`, { body, ...options });
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -36,87 +36,6 @@ export class Passages extends APIResource {
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* Representation of a passage, which is stored in archival memory.
|
|
41
|
-
*/
|
|
42
|
-
export interface PassageCreateResponse {
|
|
43
|
-
/**
|
|
44
|
-
* The embedding of the passage.
|
|
45
|
-
*/
|
|
46
|
-
embedding: Array<number> | null;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Configuration for embedding model connection and processing parameters.
|
|
50
|
-
*/
|
|
51
|
-
embedding_config: ModelsAPI.EmbeddingConfig | null;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* The text of the passage.
|
|
55
|
-
*/
|
|
56
|
-
text: string;
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* The human-friendly ID of the Passage
|
|
60
|
-
*/
|
|
61
|
-
id?: string;
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* The unique identifier of the archive containing this passage.
|
|
65
|
-
*/
|
|
66
|
-
archive_id?: string | null;
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* The creation date of the passage.
|
|
70
|
-
*/
|
|
71
|
-
created_at?: string;
|
|
72
|
-
|
|
73
|
-
/**
|
|
74
|
-
* The id of the user that made this object.
|
|
75
|
-
*/
|
|
76
|
-
created_by_id?: string | null;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The unique identifier of the file associated with the passage.
|
|
80
|
-
*/
|
|
81
|
-
file_id?: string | null;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* The name of the file (only for source passages).
|
|
85
|
-
*/
|
|
86
|
-
file_name?: string | null;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Whether this passage is deleted or not.
|
|
90
|
-
*/
|
|
91
|
-
is_deleted?: boolean;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The id of the user that made this object.
|
|
95
|
-
*/
|
|
96
|
-
last_updated_by_id?: string | null;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The metadata of the passage.
|
|
100
|
-
*/
|
|
101
|
-
metadata?: { [key: string]: unknown } | null;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* @deprecated Deprecated: Use `folder_id` field instead. The data source of the
|
|
105
|
-
* passage.
|
|
106
|
-
*/
|
|
107
|
-
source_id?: string | null;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Tags associated with this passage.
|
|
111
|
-
*/
|
|
112
|
-
tags?: Array<string> | null;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* The timestamp when the object was last updated.
|
|
116
|
-
*/
|
|
117
|
-
updated_at?: string | null;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
39
|
export interface PassageCreateParams {
|
|
121
40
|
/**
|
|
122
41
|
* The text content of the passage
|
|
@@ -142,9 +61,5 @@ export interface PassageDeleteParams {
|
|
|
142
61
|
}
|
|
143
62
|
|
|
144
63
|
export declare namespace Passages {
|
|
145
|
-
export {
|
|
146
|
-
type PassageCreateResponse as PassageCreateResponse,
|
|
147
|
-
type PassageCreateParams as PassageCreateParams,
|
|
148
|
-
type PassageDeleteParams as PassageDeleteParams,
|
|
149
|
-
};
|
|
64
|
+
export { type PassageCreateParams as PassageCreateParams, type PassageDeleteParams as PassageDeleteParams };
|
|
150
65
|
}
|
|
@@ -40,10 +40,10 @@ export interface AgentListParams extends ArrayPageParams {
|
|
|
40
40
|
>;
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* Specify which relational fields (e.g., 'tools', 'sources', 'memory')
|
|
44
|
-
* in the response. If not provided, all relationships are loaded by
|
|
45
|
-
* this can optimize performance by reducing unnecessary joins.This
|
|
46
|
-
* parameter, and no longer supported after 1.0.0 SDK versions.
|
|
43
|
+
* @deprecated Specify which relational fields (e.g., 'tools', 'sources', 'memory')
|
|
44
|
+
* to include in the response. If not provided, all relationships are loaded by
|
|
45
|
+
* default. Using this can optimize performance by reducing unnecessary joins.This
|
|
46
|
+
* is a legacy parameter, and no longer supported after 1.0.0 SDK versions.
|
|
47
47
|
*/
|
|
48
48
|
include_relationships?: Array<string> | null;
|
|
49
49
|
}
|