Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Feb 7, 2025
1 parent 42a4f31 commit bde3d04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions langchain-core/src/callbacks/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,10 @@ export abstract class BaseCallbackHandler
return undefined;
}

get lc_serializable_keys(): string[] | undefined {
return undefined;
}

/**
* The name of the serializable. Override to provide an alias or
* to preserve the serialized module name in minified environments.
Expand Down
6 changes: 3 additions & 3 deletions langchain-core/src/load/serializable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ export abstract class Serializable implements SerializableInterface {
* A manual list of keys that should be serialized.
* If not overridden, all fields passed into the constructor will be serialized.
*/
get lc_serialized_keys(): string[] | undefined {
get lc_serializable_keys(): string[] | undefined {
return undefined;
}

constructor(kwargs?: SerializedFields, ..._args: never[]) {
if (this.lc_serialized_keys !== undefined) {
if (this.lc_serializable_keys !== undefined) {
this.lc_kwargs = Object.fromEntries(
Object.entries(kwargs || {}).filter(([key]) =>
this.lc_serialized_keys?.includes(key)
this.lc_serializable_keys?.includes(key)
)
);
} else {
Expand Down

0 comments on commit bde3d04

Please sign in to comment.