@librechat/agents-types 2.1.0 → 2.1.1
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/graph.ts +18 -1
- package/package.json +1 -1
- package/run.ts +5 -13
package/graph.ts
CHANGED
@@ -3,6 +3,9 @@ import type { StateGraphArgs, StateGraph, CompiledStateGraph } from '@langchain/
|
|
3
3
|
import type { BaseMessage, AIMessageChunk } from '@langchain/core/messages';
|
4
4
|
import type { ChatGenerationChunk } from '@langchain/core/outputs';
|
5
5
|
import type { RunnableConfig } from '@langchain/core/runnables';
|
6
|
+
import type { ToolMap, GenericTool } from '@/types/tools';
|
7
|
+
import type { ClientOptions } from '@/types/llm';
|
8
|
+
import type { Providers } from '@/common';
|
6
9
|
import type { Graph } from '@/graphs';
|
7
10
|
// import type { RunnableConfig } from '@langchain/core/runnables';
|
8
11
|
|
@@ -135,4 +138,18 @@ export type PartMetadata = {
|
|
135
138
|
output?: string;
|
136
139
|
};
|
137
140
|
|
138
|
-
export type ModelEndData = StreamEventData & { output: AIMessageChunk | undefined } | undefined;
|
141
|
+
export type ModelEndData = StreamEventData & { output: AIMessageChunk | undefined } | undefined;
|
142
|
+
|
143
|
+
export type StandardGraphInput = {
|
144
|
+
runId?: string;
|
145
|
+
toolEnd?: boolean;
|
146
|
+
toolMap?: ToolMap;
|
147
|
+
provider: Providers;
|
148
|
+
signal?: AbortSignal;
|
149
|
+
instructions?: string;
|
150
|
+
streamBuffer?: number;
|
151
|
+
tools?: GenericTool[];
|
152
|
+
clientOptions: ClientOptions;
|
153
|
+
additional_instructions?: string;
|
154
|
+
reasoningKey?: 'reasoning_content' | 'reasoning';
|
155
|
+
};
|
package/package.json
CHANGED
package/run.ts
CHANGED
@@ -6,26 +6,18 @@ import type { BaseCallbackHandler, CallbackHandlerMethods } from '@langchain/cor
|
|
6
6
|
import type * as graph from '@/graphs/Graph';
|
7
7
|
import type * as e from '@/common/enum';
|
8
8
|
import type * as g from '@/types/graph';
|
9
|
-
import type * as t from '@/types/tools';
|
10
9
|
import type * as l from '@/types/llm';
|
11
10
|
|
12
11
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
13
12
|
export type ZodObjectAny = z.ZodObject<any, any, any, any>;
|
14
|
-
|
15
|
-
export type StandardGraphConfig = {
|
16
|
-
runId?: string;
|
13
|
+
export type BaseGraphConfig = {
|
17
14
|
type?: 'standard';
|
18
|
-
provider?: e.Providers;
|
19
|
-
instructions?: string;
|
20
15
|
llmConfig: l.LLMConfig;
|
21
|
-
|
22
|
-
|
23
|
-
additional_instructions?: string;
|
24
|
-
streamBuffer?: number;
|
25
|
-
signal?: AbortSignal;
|
26
|
-
clientOptions?: Record<string, unknown>;
|
27
|
-
toolEnd?: boolean;
|
16
|
+
provider?: e.Providers;
|
17
|
+
clientOptions?: l.ClientOptions;
|
28
18
|
};
|
19
|
+
export type StandardGraphConfig = BaseGraphConfig &
|
20
|
+
Omit<g.StandardGraphInput, 'provider' | 'clientOptions'>;
|
29
21
|
|
30
22
|
export interface AgentStateChannels {
|
31
23
|
messages: BaseMessage[];
|