UNPKG

@langchain/core

Version:
1 lines 1.69 kB
{"version":3,"file":"utils.d.ts","names":["isObject","isFilterEmpty","isInt","isFloat","isString","isBoolean","castValue"],"sources":["../../src/structured_query/utils.d.ts"],"sourcesContent":["/**\n * Checks if the provided argument is an object and not an array.\n */\nexport declare function isObject(obj: any): obj is object;\n/**\n * Checks if a provided filter is empty. The filter can be a function, an\n * object, a string, or undefined.\n */\nexport declare function isFilterEmpty(filter: ((q: any) => any) | object | string | undefined): filter is undefined;\n/**\n * Checks if the provided value is an integer.\n */\nexport declare function isInt(value: unknown): boolean;\n/**\n * Checks if the provided value is a floating-point number.\n */\nexport declare function isFloat(value: unknown): boolean;\n/**\n * Checks if the provided value is a string that cannot be parsed into a\n * number.\n */\nexport declare function isString(value: unknown): boolean;\n/**\n * Checks if the provided value is a boolean.\n */\nexport declare function isBoolean(value: unknown): boolean;\n/**\n * Casts a value that might be string or number to actual string or number.\n * Since LLM might return back an integer/float as a string, we need to cast\n * it back to a number, as many vector databases can't handle number as string\n * values as a comparator.\n */\nexport declare function castValue(input: unknown): string | number | boolean;\n//# sourceMappingURL=utils.d.ts.map"],"mappings":";;AAGA;AAKA;AAIwBE,iBATAF,QAAAA,CASK,GAAA,EAAA,GAAA,CAAA,EAAA,GAAA,IAAA,MAAA;AAI7B;AAKA;AAIA;AAOA;iBAxBwBC,aAAAA;;;;iBAIAC,KAAAA;;;;iBAIAC,OAAAA;;;;;iBAKAC,QAAAA;;;;iBAIAC,SAAAA;;;;;;;iBAOAC,SAAAA"}