V2 Search
Model Webhook
Pagination
Search Model
- class SearchModel(server_response)
Individual model information.
- Parameters:
server_response (dict[str, Any])
- to_list_string()
String representation of the model as a list of lines.
- Return type:
list[str]
- id: str
ID of the model.
- model_type: str
Type of the model.
- name: str
Name of the model.
- webhooks: list[ModelWebhook]
List of webhooks associated with the model.
Search Models
- class SearchModels(raw_response)
List of search models.
- Parameters:
raw_response (list[dict])
- append(object, /)
Append object to the end of the list.
- clear()
Remove all items from list.
- copy()
Return a shallow copy of the list.
- count(value, /)
Return number of occurrences of value.
- extend(iterable, /)
Extend list by appending elements from the iterable.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- insert(index, object, /)
Insert object before index.
- pop(index=-1, /)
Remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
- remove(value, /)
Remove first occurrence of value.
Raises ValueError if the value is not present.
- reverse()
Reverse IN PLACE.
- sort(*, key=None, reverse=False)
Sort the list in ascending order and return None.
The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).
If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.
The reverse flag can be set to sort in descending order.
Search RAG Document
- class SearchRagDocument(server_response)
Individual RAG document information.
- Parameters:
server_response (dict[str, Any])
- created_at: datetime
Date and time of the document creation.
- filename: str
Original filename of the uploaded document.
- id: str
Unique identifier of the RAG document.
- last_match_at: datetime | None
Date and time of the latest matching inference, if any.
- model_id: str
Model identifier linked to the RAG document.
- status: str
Current status of the RAG document.
- total_matches: int
Number of times this document was used in an inference.
Search RAG Documents
- class SearchRagDocuments(raw_response)
List of RAG documents.
- Parameters:
raw_response (list[dict])
- append(object, /)
Append object to the end of the list.
- clear()
Remove all items from list.
- copy()
Return a shallow copy of the list.
- count(value, /)
Return number of occurrences of value.
- extend(iterable, /)
Extend list by appending elements from the iterable.
- index(value, start=0, stop=9223372036854775807, /)
Return first index of value.
Raises ValueError if the value is not present.
- insert(index, object, /)
Insert object before index.
- pop(index=-1, /)
Remove and return item at index (default last).
Raises IndexError if list is empty or index is out of range.
- remove(value, /)
Remove first occurrence of value.
Raises ValueError if the value is not present.
- reverse()
Reverse IN PLACE.
- sort(*, key=None, reverse=False)
Sort the list in ascending order and return None.
The sort is in-place (i.e. the list itself is modified) and stable (i.e. the order of two equal elements is maintained).
If a key function is given, apply it once to each list item and sort them, ascending or descending, according to their function values.
The reverse flag can be set to sort in descending order.
Search Response
- class SearchResponse(raw_response)
Deprecated: use ModelSearchResponse instead.
- Parameters:
raw_response (dict[str, Any])
- body_lines()
Lines composing the response-specific body (header + items).
- Return type:
list[str]
- models: SearchModels
Paginated list of matching models.
- pagination: PaginationMetadata
Pagination metadata.
- property pagination_metadata: PaginationMetadata
Pagination metadata (Obsolete).
- property raw_http: str
Displays the result of the raw response as json string.