Library
Bases: BaseLibrary
Synchronous library client for interacting with Airia Library endpoints.
Source code in airia/client/library/sync_library.py
get_models(page_number=None, page_size=None, sort_by=None, sort_direction=None, search=None, providers=None, categories=None, licenses=None, industries=None, authors=None, is_open_source=None, chat_specialized=None, industry=None, commercial_use=None, certifications=None, has_tool_support=None, has_stream_support=None, correlation_id=None)
Retrieve models from the Airia Library with optional filtering and pagination.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
page_number
|
Optional[int]
|
The page number to be fetched |
None
|
page_size
|
Optional[int]
|
The number of items per page |
None
|
sort_by
|
Optional[str]
|
Property to sort by |
None
|
sort_direction
|
Optional[str]
|
Direction of the sort, either "ASC" for ascending or "DESC" for descending |
None
|
search
|
Optional[str]
|
An optional search string |
None
|
providers
|
Optional[str]
|
Library service provider type filter |
None
|
categories
|
Optional[str]
|
Library service model category filter |
None
|
licenses
|
Optional[str]
|
Library service model license filter |
None
|
industries
|
Optional[str]
|
Optional list of industries to filter by |
None
|
authors
|
Optional[str]
|
Optional list of authors to filter by |
None
|
is_open_source
|
Optional[bool]
|
Optional flag to filter by open source status |
None
|
chat_specialized
|
Optional[bool]
|
Optional flag to filter by chat specialized status |
None
|
industry
|
Optional[str]
|
Optional flag to filter by Industry |
None
|
commercial_use
|
Optional[bool]
|
Optional flag to filter by Commercial Use |
None
|
certifications
|
Optional[str]
|
Optional list of certifications to filter by |
None
|
has_tool_support
|
Optional[bool]
|
Optional flag to filter by the models support for tools |
None
|
has_stream_support
|
Optional[bool]
|
Optional flag to filter by the models support for response streaming |
None
|
correlation_id
|
Optional[str]
|
Optional correlation ID for request tracing. If not provided, one will be generated automatically. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
GetLibraryModelsResponse |
GetLibraryModelsResponse
|
Response containing the list of models and total count |
Raises:
| Type | Description |
|---|---|
AiriaAPIError
|
If the API request fails with details about the error. |
RequestException
|
For other request-related errors. |