ExUtcp.Search.Filters (ex_utcp v0.3.2)

Copy Markdown View Source

Search filters for UTCP tools and providers.

Provides filtering capabilities based on various criteria.

Summary

Functions

Applies filters to a list of tools.

Applies filters to a list of providers.

Creates a filter for tools with specific capabilities.

Filters tools by provider names.

Filters tools by tags.

Filters tools by transport types.

Filters providers by names.

Filters providers by transport types.

Creates a filter for tools with specific parameter types.

Creates a filter for tools with specific response types.

Functions

apply_filters(tools, filters)

@spec apply_filters([ExUtcp.Types.tool()], map()) :: [ExUtcp.Types.tool()]

Applies filters to a list of tools.

apply_provider_filters(providers, filters)

@spec apply_provider_filters([map()], map()) :: [map()]

Applies filters to a list of providers.

capability_filter(capabilities)

@spec capability_filter([String.t()]) :: (ExUtcp.Types.tool() -> boolean())

Creates a filter for tools with specific capabilities.

filter_by_providers(tools, provider_names)

@spec filter_by_providers([ExUtcp.Types.tool()], [String.t()]) :: [
  ExUtcp.Types.tool()
]

Filters tools by provider names.

filter_by_tags(tools, tags)

@spec filter_by_tags([ExUtcp.Types.tool()], [String.t()]) :: [ExUtcp.Types.tool()]

Filters tools by tags.

filter_by_transports(tools, transport_types)

@spec filter_by_transports([ExUtcp.Types.tool()], [atom()]) :: [ExUtcp.Types.tool()]

Filters tools by transport types.

filter_providers_by_names(providers, names)

@spec filter_providers_by_names([map()], [String.t()]) :: [map()]

Filters providers by names.

filter_providers_by_transports(providers, transport_types)

@spec filter_providers_by_transports([map()], [atom()]) :: [map()]

Filters providers by transport types.

parameter_type_filter(param_types)

@spec parameter_type_filter([String.t()]) :: (ExUtcp.Types.tool() -> boolean())

Creates a filter for tools with specific parameter types.

response_type_filter(response_types)

@spec response_type_filter([String.t()]) :: (ExUtcp.Types.tool() -> boolean())

Creates a filter for tools with specific response types.