Documentation Index
Fetch the complete documentation index at: https://www.getmaxim.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
View module source on GitHub
This class represents a query builder. Users can use this class to build a query rule for fetching prompts, agents or workflow from Maxim server.
and_
def and_() -> 'QueryBuilder'
Sets the operator for combining query rules to ‘AND’.
Returns:
| Name | Description |
|---|
[QueryBuilder](/sdk/python/references/models/query_builder) | The current QueryBuilder instance for method chaining. |
or_
def or_() -> 'QueryBuilder'
Sets the operator for combining query rules to ‘OR’.
Returns:
| Name | Description |
|---|
[QueryBuilder](/sdk/python/references/models/query_builder) | The current QueryBuilder instance for method chaining. |
folder
def folder(folderId: str) -> 'QueryBuilder'
Sets the folder scope for the query.
Arguments:
| Name | Type | Description |
|---|
folderId | str | The ID of the folder to set as the scope. |
Returns:
| Name | Description |
|---|
[QueryBuilder](/sdk/python/references/models/query_builder) | The current QueryBuilder instance for method chaining. |
exact_match
def exact_match() -> 'QueryBuilder'
Sets the exact match flag to True.
Returns:
| Name | Description |
|---|
[QueryBuilder](/sdk/python/references/models/query_builder) | The current QueryBuilder instance for method chaining. |
deployment_var
def deployment_var(key: str,
value: Union[str, int, bool],
enforce: bool = True) -> 'QueryBuilder'
Adds a deployment variable rule to the query.
Arguments:
| Name | Type | Description |
|---|
key | str | The key of the deployment variable. |
value | Union[str, int, bool] | The value of the deployment variable. |
enforce | bool, optional | Whether to enforce the deployment variable. Defaults to True. |
Returns:
| Name | Description |
|---|
[QueryBuilder](/sdk/python/references/models/query_builder) | The current QueryBuilder instance for method chaining. |
tag
def tag(key: str,
value: Union[str, int, bool],
enforce: bool = False) -> 'QueryBuilder'
Adds a tag rule to the query.
Arguments:
| Name | Type | Description |
|---|
key | str | The key of the tag. |
value | Union[str, int, bool] | The value of the tag. |
enforce | bool, optional | Whether to enforce the tag. Defaults to False. |
Returns:
| Name | Description |
|---|
[QueryBuilder](/sdk/python/references/models/query_builder) | The current QueryBuilder instance for method chaining. |
build
Builds the final query rule.
Raises:
ValueError - If the query is empty after trimming.
Returns:
| Name | Description |
|---|
QueryRule | A QueryRule instance with the built query. |