@convex-dev/agent 0.0.14-alpha.5 → 0.0.15-alpha.0
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/README.md +179 -64
- package/dist/commonjs/client/index.d.ts +151 -31
- package/dist/commonjs/client/index.d.ts.map +1 -1
- package/dist/commonjs/client/index.js +37 -24
- package/dist/commonjs/client/index.js.map +1 -1
- package/dist/commonjs/component/messages.d.ts +1 -0
- package/dist/commonjs/component/messages.d.ts.map +1 -1
- package/dist/commonjs/component/messages.js +4 -1
- package/dist/commonjs/component/messages.js.map +1 -1
- package/dist/esm/client/index.d.ts +151 -31
- package/dist/esm/client/index.d.ts.map +1 -1
- package/dist/esm/client/index.js +37 -24
- package/dist/esm/client/index.js.map +1 -1
- package/dist/esm/component/messages.d.ts +1 -0
- package/dist/esm/component/messages.d.ts.map +1 -1
- package/dist/esm/component/messages.js +4 -1
- package/dist/esm/component/messages.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +265 -78
- package/src/component/_generated/api.d.ts +1 -0
- package/src/component/messages.ts +4 -1
|
@@ -9,7 +9,7 @@ import { type AIMessageWithoutId } from "../mapping.js";
|
|
|
9
9
|
import { type CallSettings, MessageWithMetadata, type ProviderMetadata, type ProviderOptions, type SearchOptions, type Usage } from "../validators.js";
|
|
10
10
|
import type { OpaqueIds, RunActionCtx, RunMutationCtx, RunQueryCtx, UseApi } from "./types.js";
|
|
11
11
|
import schema from "../component/schema.js";
|
|
12
|
-
export {
|
|
12
|
+
export type { Usage, ProviderMetadata };
|
|
13
13
|
export { vUsage, vProviderMetadata, vUserMessage, vAssistantMessage, vToolMessage, vSystemMessage, vMessage, } from "../validators.js";
|
|
14
14
|
export type ThreadDoc = OpaqueIds<{
|
|
15
15
|
_id: string;
|
|
@@ -239,7 +239,7 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
239
239
|
* @param args The thread metadata.
|
|
240
240
|
* @returns The threadId of the new thread and the thread object.
|
|
241
241
|
*/
|
|
242
|
-
createThread(ctx: RunActionCtx, args?: {
|
|
242
|
+
createThread<ThreadTools extends ToolSet | undefined = undefined>(ctx: RunActionCtx, args?: {
|
|
243
243
|
/**
|
|
244
244
|
* The userId to associate with the thread. If not provided, the thread will be
|
|
245
245
|
* anonymous.
|
|
@@ -258,9 +258,14 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
258
258
|
* set in the agent constructor.
|
|
259
259
|
*/
|
|
260
260
|
usageHandler?: UsageHandler;
|
|
261
|
+
/**
|
|
262
|
+
* The tools to use for this thread.
|
|
263
|
+
* Overrides any tools passed in the agent constructor.
|
|
264
|
+
*/
|
|
265
|
+
tools?: ThreadTools;
|
|
261
266
|
}): Promise<{
|
|
262
267
|
threadId: string;
|
|
263
|
-
thread: Thread<AgentTools>;
|
|
268
|
+
thread: Thread<ThreadTools extends undefined ? AgentTools : ThreadTools>;
|
|
264
269
|
}>;
|
|
265
270
|
/**
|
|
266
271
|
* Start a new thread with the agent. This will have a fresh history, though if
|
|
@@ -271,11 +276,30 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
271
276
|
* @param args The thread metadata.
|
|
272
277
|
* @returns The threadId of the new thread.
|
|
273
278
|
*/
|
|
274
|
-
createThread(ctx: RunMutationCtx, args?: {
|
|
279
|
+
createThread<ThreadTools extends ToolSet | undefined = undefined>(ctx: RunMutationCtx, args?: {
|
|
280
|
+
/**
|
|
281
|
+
* The userId to associate with the thread. If not provided, the thread will be
|
|
282
|
+
* anonymous.
|
|
283
|
+
*/
|
|
275
284
|
userId?: string;
|
|
285
|
+
/**
|
|
286
|
+
* The title of the thread. Not currently used.
|
|
287
|
+
*/
|
|
276
288
|
title?: string;
|
|
289
|
+
/**
|
|
290
|
+
* The summary of the thread. Not currently used.
|
|
291
|
+
*/
|
|
277
292
|
summary?: string;
|
|
293
|
+
/**
|
|
294
|
+
* The usage handler to use for this thread. Overrides any handler
|
|
295
|
+
* set in the agent constructor.
|
|
296
|
+
*/
|
|
278
297
|
usageHandler?: UsageHandler;
|
|
298
|
+
/**
|
|
299
|
+
* The tools to use for this thread.
|
|
300
|
+
* Overrides any tools passed in the agent constructor.
|
|
301
|
+
*/
|
|
302
|
+
tools?: ThreadTools;
|
|
279
303
|
}): Promise<{
|
|
280
304
|
threadId: string;
|
|
281
305
|
}>;
|
|
@@ -287,7 +311,7 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
287
311
|
* @param { threadId, userId }: the thread and user to associate the messages with.
|
|
288
312
|
* @returns Functions bound to the userId and threadId on a `{thread}` object.
|
|
289
313
|
*/
|
|
290
|
-
continueThread(ctx: RunActionCtx, args: {
|
|
314
|
+
continueThread<ThreadTools extends ToolSet | undefined = undefined>(ctx: RunActionCtx, args: {
|
|
291
315
|
/**
|
|
292
316
|
* The associated thread created by {@link createThread}
|
|
293
317
|
*/
|
|
@@ -302,8 +326,13 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
302
326
|
* set in the agent constructor.
|
|
303
327
|
*/
|
|
304
328
|
usageHandler?: UsageHandler;
|
|
329
|
+
/**
|
|
330
|
+
* The tools to use for this thread.
|
|
331
|
+
* Overrides any tools passed in the agent constructor.
|
|
332
|
+
*/
|
|
333
|
+
tools?: ThreadTools;
|
|
305
334
|
}): Promise<{
|
|
306
|
-
thread: Thread<AgentTools>;
|
|
335
|
+
thread: Thread<ThreadTools extends undefined ? AgentTools : ThreadTools>;
|
|
307
336
|
}>;
|
|
308
337
|
/**
|
|
309
338
|
* Fetch the context messages for a thread.
|
|
@@ -314,12 +343,18 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
314
343
|
* @returns
|
|
315
344
|
*/
|
|
316
345
|
fetchContextMessages(ctx: RunQueryCtx | RunActionCtx, args: {
|
|
317
|
-
userId
|
|
318
|
-
threadId
|
|
346
|
+
userId: string | undefined;
|
|
347
|
+
threadId: string | undefined;
|
|
319
348
|
messages: CoreMessage[];
|
|
320
349
|
parentMessageId?: string;
|
|
321
|
-
|
|
322
|
-
|
|
350
|
+
contextOptions: ContextOptions | undefined;
|
|
351
|
+
}): Promise<CoreMessage[]>;
|
|
352
|
+
/**
|
|
353
|
+
* Get the embeddings for a set of messages.
|
|
354
|
+
* @param messages The messages to get the embeddings for.
|
|
355
|
+
* @returns The embeddings for the messages.
|
|
356
|
+
*/
|
|
357
|
+
generateEmbeddings(messages: CoreMessage[]): Promise<{
|
|
323
358
|
vectors: (number[] | null)[];
|
|
324
359
|
dimension: VectorDimension;
|
|
325
360
|
model: string;
|
|
@@ -365,6 +400,7 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
365
400
|
* @param args What to save
|
|
366
401
|
*/
|
|
367
402
|
saveStep<TOOLS extends ToolSet>(ctx: RunMutationCtx, args: {
|
|
403
|
+
userId?: string;
|
|
368
404
|
threadId: string;
|
|
369
405
|
/**
|
|
370
406
|
* The message this step is in response to.
|
|
@@ -415,7 +451,7 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
415
451
|
* for the {@link ContextOptions} and {@link StorageOptions}.
|
|
416
452
|
* @returns The result of the generateText function.
|
|
417
453
|
*/
|
|
418
|
-
generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>(ctx: RunActionCtx, { userId, threadId, usageHandler, }: {
|
|
454
|
+
generateText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never>(ctx: RunActionCtx, { userId, threadId, usageHandler, tools: threadTools, }: {
|
|
419
455
|
userId?: string;
|
|
420
456
|
threadId?: string;
|
|
421
457
|
/**
|
|
@@ -423,7 +459,11 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
423
459
|
* set in the agent constructor.
|
|
424
460
|
*/
|
|
425
461
|
usageHandler?: UsageHandler;
|
|
426
|
-
|
|
462
|
+
/**
|
|
463
|
+
* The tools to use for this thread. Overrides any tools passed in the agent constructor.
|
|
464
|
+
*/
|
|
465
|
+
tools?: ToolSet;
|
|
466
|
+
}, args: TextArgs<AgentTools, TOOLS, OUTPUT, OUTPUT_PARTIAL>): Promise<GenerateTextResult<TOOLS extends undefined ? AgentTools : TOOLS, OUTPUT> & GenerationOutputMetadata>;
|
|
427
467
|
/**
|
|
428
468
|
* This behaves like {@link streamText} from the "ai" package except that
|
|
429
469
|
* it add context based on the userId and threadId and saves the input and
|
|
@@ -436,11 +476,17 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
436
476
|
* for the {@link ContextOptions} and {@link StorageOptions}.
|
|
437
477
|
* @returns The result of the streamText function.
|
|
438
478
|
*/
|
|
439
|
-
streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>(ctx: RunActionCtx, { userId, threadId, usageHandler,
|
|
479
|
+
streamText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, PARTIAL_OUTPUT = never>(ctx: RunActionCtx, { userId, threadId, usageHandler,
|
|
480
|
+
/**
|
|
481
|
+
* @deprecated Pass `tools` in the next parameter instead.
|
|
482
|
+
* This is only intended to pass through thread-default tools.
|
|
483
|
+
*/
|
|
484
|
+
tools: threadTools, }: {
|
|
440
485
|
userId?: string;
|
|
441
486
|
threadId?: string;
|
|
442
487
|
usageHandler?: UsageHandler;
|
|
443
|
-
|
|
488
|
+
tools?: ToolSet;
|
|
489
|
+
}, args: StreamingTextArgs<AgentTools, TOOLS, OUTPUT, PARTIAL_OUTPUT>): Promise<StreamTextResult<TOOLS extends undefined ? AgentTools : TOOLS, PARTIAL_OUTPUT> & GenerationOutputMetadata>;
|
|
444
490
|
saveMessagesAndFetchContext<T extends {
|
|
445
491
|
id?: string;
|
|
446
492
|
prompt?: string;
|
|
@@ -450,9 +496,9 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
450
496
|
userId: string | undefined;
|
|
451
497
|
threadId: string | undefined;
|
|
452
498
|
parentMessageId?: string;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
} &
|
|
499
|
+
contextOptions?: ContextOptions;
|
|
500
|
+
storageOptions?: StorageOptions;
|
|
501
|
+
} & T): Promise<{
|
|
456
502
|
args: T;
|
|
457
503
|
messageId: string | undefined;
|
|
458
504
|
}>;
|
|
@@ -498,12 +544,13 @@ export declare class Agent<AgentTools extends ToolSet> {
|
|
|
498
544
|
* @param args The arguments to the saveObject function.
|
|
499
545
|
*/
|
|
500
546
|
saveObject(ctx: RunMutationCtx, args: {
|
|
547
|
+
userId: string | undefined;
|
|
501
548
|
threadId: string;
|
|
502
549
|
messageId: string;
|
|
503
550
|
result: GenerateObjectResult<unknown>;
|
|
504
551
|
metadata?: Omit<MessageWithMetadata, "message">;
|
|
505
552
|
}): Promise<void>;
|
|
506
|
-
mergedContextOptions(opts: ContextOptions): ContextOptions;
|
|
553
|
+
mergedContextOptions(opts: ContextOptions | undefined): ContextOptions;
|
|
507
554
|
searchOptionsWithDefaults(contextOptions: ContextOptions, messages: CoreMessage[]): Promise<SearchOptions>;
|
|
508
555
|
/**
|
|
509
556
|
* Create a mutation that creates a thread so you can call it from a Workflow.
|
|
@@ -832,29 +879,102 @@ export declare function createTool<PARAMETERS extends ToolParameters, RESULT>(t:
|
|
|
832
879
|
}): Tool<PARAMETERS, RESULT> & {
|
|
833
880
|
execute: (args: inferParameters<PARAMETERS>, options: ToolExecutionOptions) => PromiseLike<RESULT>;
|
|
834
881
|
};
|
|
835
|
-
type TextArgs<AgentTools extends ToolSet, TOOLS extends ToolSet,
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
882
|
+
type TextArgs<AgentTools extends ToolSet, TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never> = Omit<Parameters<typeof generateText<TOOLS extends undefined ? AgentTools : TOOLS, OUTPUT, OUTPUT_PARTIAL>>[0], "toolChoice" | "tools" | "model"> & {
|
|
883
|
+
/**
|
|
884
|
+
* The model to use for the tool calls. This will override the model specified
|
|
885
|
+
* in the Agent constructor.
|
|
886
|
+
*/
|
|
840
887
|
model?: LanguageModelV1;
|
|
888
|
+
/**
|
|
889
|
+
* The tools to use for the tool calls. This will override tools specified
|
|
890
|
+
* in the Agent constructor or createThread / continueThread.
|
|
891
|
+
*/
|
|
892
|
+
tools?: TOOLS;
|
|
893
|
+
/**
|
|
894
|
+
* The tool choice to use for the tool calls. This must be one of the tools
|
|
895
|
+
* specified in the tools array. e.g. {toolName: "getWeather", type: "tool"}
|
|
896
|
+
*/
|
|
897
|
+
toolChoice?: ToolChoice<TOOLS extends undefined ? AgentTools : TOOLS>;
|
|
898
|
+
/**
|
|
899
|
+
* The parent message id to use for the tool calls.
|
|
900
|
+
*/
|
|
841
901
|
parentMessageId?: string;
|
|
842
|
-
|
|
902
|
+
/**
|
|
903
|
+
* The context options to use for passing in message history to the LLM.
|
|
904
|
+
*/
|
|
905
|
+
contextOptions?: ContextOptions;
|
|
906
|
+
/**
|
|
907
|
+
* The storage options to use for saving the input and output messages to the thread.
|
|
908
|
+
*/
|
|
909
|
+
storageOptions?: StorageOptions;
|
|
910
|
+
} & ContextOptions & StorageOptions;
|
|
911
|
+
type StreamingTextArgs<AgentTools extends ToolSet, TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never> = Omit<Parameters<typeof streamText<TOOLS extends undefined ? AgentTools : TOOLS, OUTPUT, OUTPUT_PARTIAL>>[0], "toolChoice" | "tools" | "model"> & {
|
|
912
|
+
/**
|
|
913
|
+
* The model to use for the tool calls. This will override the model specified
|
|
914
|
+
* in the Agent constructor.
|
|
915
|
+
*/
|
|
916
|
+
model?: LanguageModelV1;
|
|
917
|
+
/**
|
|
918
|
+
* The tools to use for the tool calls. This will override tools specified
|
|
919
|
+
* in the Agent constructor or createThread / continueThread.
|
|
920
|
+
*/
|
|
843
921
|
tools?: TOOLS;
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
922
|
+
/**
|
|
923
|
+
* The tool choice to use for the tool calls. This must be one of the tools
|
|
924
|
+
* specified in the tools array. e.g. {toolName: "getWeather", type: "tool"}
|
|
925
|
+
*/
|
|
926
|
+
toolChoice?: ToolChoice<TOOLS extends undefined ? AgentTools : TOOLS>;
|
|
927
|
+
/**
|
|
928
|
+
* The parent message id to use for the tool calls.
|
|
929
|
+
*/
|
|
930
|
+
parentMessageId?: string;
|
|
931
|
+
/**
|
|
932
|
+
* The context options to use for passing in message history to the LLM.
|
|
933
|
+
*/
|
|
934
|
+
contextOptions?: ContextOptions;
|
|
935
|
+
/**
|
|
936
|
+
* The storage options to use for saving the input and output messages to the thread.
|
|
937
|
+
*/
|
|
938
|
+
storageOptions?: StorageOptions;
|
|
847
939
|
} & ContextOptions & StorageOptions;
|
|
848
940
|
type BaseGenerateObjectOptions = StorageOptions & ContextOptions & CallSettings & {
|
|
941
|
+
/**
|
|
942
|
+
* The model to use for the object generation. This will override the model
|
|
943
|
+
* specified in the Agent constructor.
|
|
944
|
+
*/
|
|
849
945
|
model?: LanguageModelV1;
|
|
850
|
-
|
|
946
|
+
/**
|
|
947
|
+
* The system prompt to use for the object generation. This will override the
|
|
948
|
+
* system prompt specified in the Agent constructor.
|
|
949
|
+
*/
|
|
851
950
|
system?: string;
|
|
951
|
+
/**
|
|
952
|
+
* The prompt to the LLM to use for the object generation.
|
|
953
|
+
* Specify this or messages, but not both.
|
|
954
|
+
*/
|
|
852
955
|
prompt?: string;
|
|
956
|
+
/**
|
|
957
|
+
* The messages to use for the object generation.
|
|
958
|
+
* Note: recent messages are automatically added based on the thread it's
|
|
959
|
+
* associated with and your contextOptions.
|
|
960
|
+
*/
|
|
853
961
|
messages?: CoreMessage[];
|
|
854
962
|
experimental_repairText?: RepairTextFunction;
|
|
855
963
|
experimental_telemetry?: TelemetrySettings;
|
|
856
964
|
providerOptions?: ProviderOptions;
|
|
857
965
|
experimental_providerMetadata?: ProviderMetadata;
|
|
966
|
+
/**
|
|
967
|
+
* The parent message id to use for the object generation.
|
|
968
|
+
*/
|
|
969
|
+
parentMessageId?: string;
|
|
970
|
+
/**
|
|
971
|
+
* The context options to use for passing in message history to the LLM.
|
|
972
|
+
*/
|
|
973
|
+
contextOptions?: ContextOptions;
|
|
974
|
+
/**
|
|
975
|
+
* The storage options to use for saving the input and output messages to the thread.
|
|
976
|
+
*/
|
|
977
|
+
storageOptions?: StorageOptions;
|
|
858
978
|
};
|
|
859
979
|
type GenerateObjectObjectOptions<T extends Record<string, unknown>> = BaseGenerateObjectOptions & {
|
|
860
980
|
output?: "object";
|
|
@@ -886,7 +1006,7 @@ type OurStreamObjectArgs<T> = StreamObjectArgs<T> & Pick<Parameters<typeof strea
|
|
|
886
1006
|
type ThreadOutputMetadata = GenerationOutputMetadata & {
|
|
887
1007
|
messageId: string;
|
|
888
1008
|
};
|
|
889
|
-
interface Thread<
|
|
1009
|
+
interface Thread<DefaultTools extends ToolSet> {
|
|
890
1010
|
/**
|
|
891
1011
|
* The target threadId, from the startThread or continueThread initializers.
|
|
892
1012
|
*/
|
|
@@ -901,7 +1021,7 @@ interface Thread<AgentTools extends ToolSet> {
|
|
|
901
1021
|
* for the {@link ContextOptions} and {@link StorageOptions}.
|
|
902
1022
|
* @returns The result of the generateText function.
|
|
903
1023
|
*/
|
|
904
|
-
generateText<TOOLS extends ToolSet, OUTPUT = never, OUTPUT_PARTIAL = never>(args: TextArgs<
|
|
1024
|
+
generateText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, OUTPUT_PARTIAL = never>(args: TextArgs<TOOLS extends undefined ? DefaultTools : TOOLS, TOOLS, OUTPUT, OUTPUT_PARTIAL>): Promise<GenerateTextResult<TOOLS extends undefined ? DefaultTools : TOOLS, OUTPUT> & ThreadOutputMetadata>;
|
|
905
1025
|
/**
|
|
906
1026
|
* This behaves like {@link streamText} from the "ai" package except that
|
|
907
1027
|
* it add context based on the userId and threadId and saves the input and
|
|
@@ -912,7 +1032,7 @@ interface Thread<AgentTools extends ToolSet> {
|
|
|
912
1032
|
* for the {@link ContextOptions} and {@link StorageOptions}.
|
|
913
1033
|
* @returns The result of the streamText function.
|
|
914
1034
|
*/
|
|
915
|
-
streamText<TOOLS extends ToolSet, OUTPUT = never, PARTIAL_OUTPUT = never>(args:
|
|
1035
|
+
streamText<TOOLS extends ToolSet | undefined = undefined, OUTPUT = never, PARTIAL_OUTPUT = never>(args: StreamingTextArgs<TOOLS extends undefined ? DefaultTools : TOOLS, TOOLS, OUTPUT, PARTIAL_OUTPUT>): Promise<StreamTextResult<TOOLS extends undefined ? DefaultTools : TOOLS, PARTIAL_OUTPUT> & ThreadOutputMetadata>;
|
|
916
1036
|
/**
|
|
917
1037
|
* This behaves like {@link generateObject} from the "ai" package except that
|
|
918
1038
|
* it add context based on the userId and threadId and saves the input and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,kBAAkB,EAClB,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,EACJ,UAAU,EACV,oBAAoB,EACpB,OAAO,EACR,MAAM,IAAI,CAAC;AACZ,OAAO,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,UAAU,EAEX,MAAM,IAAI,CAAC;AAGZ,OAAO,EAAE,KAAK,EAAK,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,kBAAkB,EAOxB,MAAM,eAAe,CAAC;AAOvB,OAAO,EACL,KAAK,YAAY,EACjB,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,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,cAAc,CACf,GACA,OAAO,CACR,kBAAkB,CAAC,KAAK,SAAS,SAAS,GAAG,YAAY,GAAG,KAAK,EAAE,MAAM,CAAC,GACxE,oBAAoB,CACvB,CAAC;IAEF;;;;;;;;;OASG;IACH,UAAU,CACR,KAAK,SAAS,OAAO,GAAG,SAAS,GAAG,SAAS,EAC7C,MAAM,GAAG,KAAK,EACd,cAAc,GAAG,KAAK,EAEtB,IAAI,EAAE,iBAAiB,CACrB,KAAK,SAAS,SAAS,GAAG,YAAY,GAAG,KAAK,EAC9C,KAAK,EACL,MAAM,EACN,cAAc,CACf,GACA,OAAO,CACR,gBAAgB,CACd,KAAK,SAAS,SAAS,GAAG,YAAY,GAAG,KAAK,EAC9C,cAAc,CACf,GACC,oBAAoB,CACvB,CAAC;IACF;;;;;;;;;OASG;IACH,cAAc,CAAC,CAAC,EACd,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GACrB,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,GAAG,oBAAoB,CAAC,CAAC;IAC3D;;;;;;;;;OASG;IACH,cAAc,CACZ,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,GAAG,oBAAoB,CAAC,CAAC;IACnE;;;;;;;;;OASG;IACH,YAAY,CAAC,CAAC,EACZ,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAC3B,OAAO,CACR,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,GAAG,oBAAoB,CACpE,CAAC;CACH"}
|
|
@@ -28,6 +28,7 @@ export class Agent {
|
|
|
28
28
|
threadId: threadDoc._id,
|
|
29
29
|
userId: args?.userId,
|
|
30
30
|
usageHandler: args?.usageHandler,
|
|
31
|
+
tools: args?.tools,
|
|
31
32
|
});
|
|
32
33
|
return {
|
|
33
34
|
threadId: threadDoc._id,
|
|
@@ -66,13 +67,15 @@ export class Agent {
|
|
|
66
67
|
// Fetch the latest messages from the thread
|
|
67
68
|
const contextMessages = [];
|
|
68
69
|
let included;
|
|
69
|
-
const opts = this.mergedContextOptions(args);
|
|
70
|
+
const opts = this.mergedContextOptions(args.contextOptions);
|
|
70
71
|
if (opts.searchOptions?.textSearch || opts.searchOptions?.vectorSearch) {
|
|
71
72
|
if (!("runAction" in ctx)) {
|
|
72
73
|
throw new Error("searchUserMessages only works in an action");
|
|
73
74
|
}
|
|
74
75
|
const searchMessages = await ctx.runAction(this.component.messages.searchMessages, {
|
|
75
|
-
userId: args.searchOtherThreads
|
|
76
|
+
userId: args.contextOptions?.searchOtherThreads
|
|
77
|
+
? args.userId
|
|
78
|
+
: undefined,
|
|
76
79
|
threadId: args.threadId,
|
|
77
80
|
parentMessageId: args.parentMessageId,
|
|
78
81
|
...(await this.searchOptionsWithDefaults(opts, args.messages)),
|
|
@@ -99,7 +102,12 @@ export class Agent {
|
|
|
99
102
|
.sort((a, b) => a.order === b.order ? a.stepOrder - b.stepOrder : a.order - b.order)
|
|
100
103
|
.map((m) => deserializeMessage(m.message));
|
|
101
104
|
}
|
|
102
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Get the embeddings for a set of messages.
|
|
107
|
+
* @param messages The messages to get the embeddings for.
|
|
108
|
+
* @returns The embeddings for the messages.
|
|
109
|
+
*/
|
|
110
|
+
async generateEmbeddings(messages) {
|
|
103
111
|
let embeddings;
|
|
104
112
|
if (this.options.textEmbedding) {
|
|
105
113
|
const messageTexts = messages.map((m) => !isTool(m) && extractText(m));
|
|
@@ -139,7 +147,7 @@ export class Agent {
|
|
|
139
147
|
* @returns
|
|
140
148
|
*/
|
|
141
149
|
async saveMessages(ctx, args) {
|
|
142
|
-
const embeddings = await this.
|
|
150
|
+
const embeddings = await this.generateEmbeddings(args.messages);
|
|
143
151
|
const result = await ctx.runMutation(this.component.messages.addMessages, {
|
|
144
152
|
threadId: args.threadId,
|
|
145
153
|
userId: args.userId,
|
|
@@ -173,7 +181,7 @@ export class Agent {
|
|
|
173
181
|
provider: args.provider ?? this.options.chat.provider,
|
|
174
182
|
model: args.model ?? this.options.chat.modelId,
|
|
175
183
|
});
|
|
176
|
-
const embeddings = await this.
|
|
184
|
+
const embeddings = await this.generateEmbeddings(messages.map((m) => m.message));
|
|
177
185
|
if (embeddings) {
|
|
178
186
|
const { model, dimension, vectors } = embeddings;
|
|
179
187
|
for (let i = 0; i < messages.length; i++) {
|
|
@@ -184,6 +192,7 @@ export class Agent {
|
|
|
184
192
|
}
|
|
185
193
|
}
|
|
186
194
|
await ctx.runMutation(this.component.messages.addStep, {
|
|
195
|
+
userId: args.userId,
|
|
187
196
|
threadId: args.threadId,
|
|
188
197
|
messageId: args.messageId,
|
|
189
198
|
step: { step, messages },
|
|
@@ -224,10 +233,10 @@ export class Agent {
|
|
|
224
233
|
* for the {@link ContextOptions} and {@link StorageOptions}.
|
|
225
234
|
* @returns The result of the generateText function.
|
|
226
235
|
*/
|
|
227
|
-
async generateText(ctx, { userId, threadId, usageHandler, }, args) {
|
|
236
|
+
async generateText(ctx, { userId, threadId, usageHandler, tools: threadTools, }, args) {
|
|
228
237
|
const { args: aiArgs, messageId } = await this.saveMessagesAndFetchContext(ctx, { ...args, userId, threadId });
|
|
229
238
|
const toolCtx = { ...ctx, userId, threadId, messageId };
|
|
230
|
-
const tools = wrapTools(toolCtx, this.options.tools
|
|
239
|
+
const tools = wrapTools(toolCtx, args.tools ?? threadTools ?? this.options.tools);
|
|
231
240
|
const saveOutputMessages = args.saveOutputMessages ??
|
|
232
241
|
this.options.storageOptions?.saveOutputMessages;
|
|
233
242
|
const model = aiArgs.model ?? this.options.chat;
|
|
@@ -239,12 +248,11 @@ export class Agent {
|
|
|
239
248
|
maxRetries: this.options.maxRetries,
|
|
240
249
|
...aiArgs,
|
|
241
250
|
model,
|
|
242
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
243
|
-
toolChoice: args.toolChoice,
|
|
244
251
|
tools,
|
|
245
252
|
onStepFinish: async (step) => {
|
|
246
253
|
if (threadId && messageId && saveOutputMessages !== false) {
|
|
247
254
|
await this.saveStep(ctx, {
|
|
255
|
+
userId,
|
|
248
256
|
threadId,
|
|
249
257
|
messageId,
|
|
250
258
|
step,
|
|
@@ -290,10 +298,15 @@ export class Agent {
|
|
|
290
298
|
* for the {@link ContextOptions} and {@link StorageOptions}.
|
|
291
299
|
* @returns The result of the streamText function.
|
|
292
300
|
*/
|
|
293
|
-
async streamText(ctx, { userId, threadId, usageHandler,
|
|
301
|
+
async streamText(ctx, { userId, threadId, usageHandler,
|
|
302
|
+
/**
|
|
303
|
+
* @deprecated Pass `tools` in the next parameter instead.
|
|
304
|
+
* This is only intended to pass through thread-default tools.
|
|
305
|
+
*/
|
|
306
|
+
tools: threadTools, }, args) {
|
|
294
307
|
const { args: aiArgs, messageId } = await this.saveMessagesAndFetchContext(ctx, { ...args, userId, threadId });
|
|
295
308
|
const toolCtx = { ...ctx, userId, threadId, messageId };
|
|
296
|
-
const tools = wrapTools(toolCtx, this.options.tools
|
|
309
|
+
const tools = wrapTools(toolCtx, args.tools ?? threadTools ?? this.options.tools);
|
|
297
310
|
const saveOutputMessages = args.saveOutputMessages ??
|
|
298
311
|
this.options.storageOptions?.saveOutputMessages;
|
|
299
312
|
const model = aiArgs.model ?? this.options.chat;
|
|
@@ -304,8 +317,6 @@ export class Agent {
|
|
|
304
317
|
maxRetries: this.options.maxRetries,
|
|
305
318
|
...aiArgs,
|
|
306
319
|
model,
|
|
307
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
308
|
-
toolChoice: args.toolChoice,
|
|
309
320
|
tools,
|
|
310
321
|
onChunk: async (chunk) => {
|
|
311
322
|
// console.log("onChunk", chunk);
|
|
@@ -326,6 +337,7 @@ export class Agent {
|
|
|
326
337
|
// TODO: compare delta to the output. internally drop the deltas when committing
|
|
327
338
|
if (threadId && messageId) {
|
|
328
339
|
await this.saveStep(ctx, {
|
|
340
|
+
userId,
|
|
329
341
|
threadId,
|
|
330
342
|
messageId,
|
|
331
343
|
step,
|
|
@@ -349,20 +361,19 @@ export class Agent {
|
|
|
349
361
|
return result;
|
|
350
362
|
}
|
|
351
363
|
async saveMessagesAndFetchContext(ctx, { id, userId, threadId, parentMessageId, system, ...args }) {
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
const saveAll = args.saveAllInputMessages ??
|
|
355
|
-
this.options.storageOptions?.saveAllInputMessages;
|
|
364
|
+
const contextOptions = args.contextOptions ?? this.options.contextOptions ?? args;
|
|
365
|
+
const storageOptions = args.storageOptions ?? this.options.storageOptions ?? args;
|
|
356
366
|
const messages = promptOrMessagesToCoreMessages(args);
|
|
357
367
|
const contextMessages = await this.fetchContextMessages(ctx, {
|
|
358
|
-
messages,
|
|
359
|
-
parentMessageId,
|
|
360
368
|
userId,
|
|
361
369
|
threadId,
|
|
362
|
-
|
|
370
|
+
messages,
|
|
371
|
+
parentMessageId,
|
|
372
|
+
contextOptions,
|
|
363
373
|
});
|
|
364
374
|
let messageId;
|
|
365
|
-
if (threadId &&
|
|
375
|
+
if (threadId && storageOptions?.saveAnyInputMessages !== false) {
|
|
376
|
+
const saveAll = storageOptions?.saveAllInputMessages;
|
|
366
377
|
const coreMessages = saveAll ? messages : messages.slice(-1);
|
|
367
378
|
const saved = await this.saveMessages(ctx, {
|
|
368
379
|
threadId,
|
|
@@ -413,7 +424,7 @@ export class Agent {
|
|
|
413
424
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
414
425
|
}));
|
|
415
426
|
if (threadId && messageId && saveOutputMessages !== false) {
|
|
416
|
-
await this.saveObject(ctx, { threadId, messageId, result });
|
|
427
|
+
await this.saveObject(ctx, { threadId, messageId, result, userId });
|
|
417
428
|
}
|
|
418
429
|
result.messageId = messageId;
|
|
419
430
|
if (trackUsage && result.usage) {
|
|
@@ -471,6 +482,7 @@ export class Agent {
|
|
|
471
482
|
onFinish: async (result) => {
|
|
472
483
|
if (threadId && messageId && saveOutputMessages !== false) {
|
|
473
484
|
await this.saveObject(ctx, {
|
|
485
|
+
userId,
|
|
474
486
|
threadId,
|
|
475
487
|
messageId,
|
|
476
488
|
result: {
|
|
@@ -517,7 +529,7 @@ export class Agent {
|
|
|
517
529
|
model: this.options.chat.modelId,
|
|
518
530
|
provider: this.options.chat.provider,
|
|
519
531
|
});
|
|
520
|
-
const embeddings = await this.
|
|
532
|
+
const embeddings = await this.generateEmbeddings([withoutEmbed[0].message]);
|
|
521
533
|
const messages = embeddings?.vectors[0]
|
|
522
534
|
? [
|
|
523
535
|
{
|
|
@@ -531,6 +543,7 @@ export class Agent {
|
|
|
531
543
|
]
|
|
532
544
|
: withoutEmbed;
|
|
533
545
|
await ctx.runMutation(this.component.messages.addStep, {
|
|
546
|
+
userId: args.userId,
|
|
534
547
|
threadId: args.threadId,
|
|
535
548
|
messageId: args.messageId,
|
|
536
549
|
failPendingSteps: false,
|
|
@@ -540,7 +553,7 @@ export class Agent {
|
|
|
540
553
|
mergedContextOptions(opts) {
|
|
541
554
|
const searchOptions = {
|
|
542
555
|
...this.options.contextOptions?.searchOptions,
|
|
543
|
-
...opts
|
|
556
|
+
...opts?.searchOptions,
|
|
544
557
|
};
|
|
545
558
|
return {
|
|
546
559
|
...this.options.contextOptions,
|