langchain_community.utilities.arcee.DALMFilter¶
class langchain_community.utilities.arcee.DALMFilter[source]¶
Bases: BaseModel
Filters available for a DALM retrieval and generation.
Parameters
field_name – The field to filter on. Can be ‘document’ or ‘name’ to filter
on your document’s raw text or title. Any other field will be presumed
to be a metadata field you included when uploading your context data
filter_type – Currently ‘fuzzy_search’ and ‘strict_search’ are supported.
‘fuzzy_search’ means a fuzzy search on the provided field is performed.
The exact strict doesn’t need to exist in the document
for this to find a match.
Very useful for scanning a document for some keyword terms.
‘strict_search’ means that the exact string must appear
in the provided field.
This is NOT an exact eq filter. ie a document with content
“the happy dog crossed the street” will match on a strict_search of
“dog” but won’t match on “the dog”.
Python equivalent of return search_string in full_string.
value – The actual value to search for in the context data/metadata
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param field_name: str [Required]¶
param filter_type: langchain_community.utilities.arcee.DALMFilterType [Required]¶
param value: str [Required]¶
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values