clarifai-nodejs / Exports / Search
Class: Search
Hierarchy
-
Lister
↳
Search
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Search(«destructured»
): Search
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | undefined |
› authConfig? | AuthConfig | undefined |
› metric? | string | DEFAULT_SEARCH_METRIC |
› topK? | number | DEFAULT_TOP_K |
Returns
Overrides
Lister.constructor
Defined in
Properties
dataProto
• Private
dataProto: Data
Defined in
inputProto
• Private
inputProto: Input
Defined in
metricDistance
• Private
metricDistance: "COSINE_DISTANCE"
| "EUCLIDEAN_DISTANCE"
Defined in
topK
• Private
topK: number
Defined in
Methods
getAnnotProto
▸ getAnnotProto(args
): Annotation
Parameters
Name | Type |
---|---|
args | Object |
args.concepts? | { id? : string ; language? : string ; name? : string ; value? : number }[] |
args.geoPoint? | Object |
args.geoPoint.geoLimit | number |
args.geoPoint.latitude | number |
args.geoPoint.longitude | number |
args.imageBytes? | unknown |
args.imageUrl? | string |
args.inputDatasetIds? | string [] |
args.inputStatusCode? | number |
args.inputTypes? | ("image" | "text" | "video" | "audio" )[] |
args.metadata? | Record <string , unknown > |
args.textRaw? | string |
Returns
Annotation
Defined in
getGeoPointProto
▸ getGeoPointProto(longitude
, latitude
, geoLimit
): Geo
Parameters
Name | Type |
---|---|
longitude | number |
latitude | number |
geoLimit | number |
Returns
Geo
Defined in
getInputProto
▸ getInputProto(args
): Input
Parameters
Name | Type |
---|---|
args | Object |
args.concepts? | { id? : string ; language? : string ; name? : string ; value? : number }[] |
args.geoPoint? | Object |
args.geoPoint.geoLimit | number |
args.geoPoint.latitude | number |
args.geoPoint.longitude | number |
args.imageBytes? | unknown |
args.imageUrl? | string |
args.inputDatasetIds? | string [] |
args.inputStatusCode? | number |
args.inputTypes? | ("image" | "text" | "video" | "audio" )[] |
args.metadata? | Record <string , unknown > |
args.textRaw? | string |
Returns
Input
Defined in
listAllPagesGenerator
▸ listAllPagesGenerator<T
>(endpoint
, requestData
): AsyncGenerator
<AsObject
& Record
<"hits"
, unknown
>, void
, void
>
Type parameters
Name | Type |
---|---|
T | extends PostAnnotationsSearchesRequest | PostInputsSearchesRequest |
Parameters
Name | Type |
---|---|
endpoint | (request : T , metadata : Metadata , options : Partial <CallOptions >) => Promise <MultiSearchResponse > |
requestData | T |
Returns
AsyncGenerator
<AsObject
& Record
<"hits"
, unknown
>, void
, void
>
Defined in
query
▸ query(«destructured»
): AsyncGenerator
<AsObject
& Record
<"hits"
, unknown
>, void
, void
>
Parameters
Name | Type |
---|---|
«destructured» | Object |
› filters? | { concepts? : { id? : string ; language? : string ; name? : string ; value? : number }[] ; geoPoint? : { geoLimit : number ; latitude : number ; longitude : number } ; imageBytes? : unknown ; imageUrl? : string ; inputDatasetIds? : string [] ; inputStatusCode? : number ; inputTypes? : ("image" | "text" | "video" | "audio" )[] ; metadata? : Record <string , unknown > ; textRaw? : string }[] |
› ranks? | { concepts? : { id? : string ; language? : string ; name? : string ; value? : number }[] ; geoPoint? : { geoLimit : number ; latitude : number ; longitude : number } ; imageBytes? : unknown ; imageUrl? : string ; inputDatasetIds? : string [] ; inputStatusCode? : number ; inputTypes? : ("image" | "text" | "video" | "audio" )[] ; metadata? : Record <string , unknown > ; textRaw? : string }[] |
Returns
AsyncGenerator
<AsObject
& Record
<"hits"
, unknown
>, void
, void
>