RoutingRules
List RoutingRules
Returns a paginated list of routing rules for the current project, ordered by priority ascending.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.routing_rules.list(limit=10)
# Handle response
print(res)
Show Parameters
Show Parameters
Show Response
Show Response
Show Properties of data
Show Properties of data
Create a RoutingRule
Creates a new routing rule with expression, models configuration, and priority settings.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.routing_rules.create(display_name="Freeda_Beahan")
# Handle response
print(res)
Show Parameters
Show Parameters
Show Response
Show Response
Delete a RoutingRule
Deletes an existing routing rule by ID.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
orq.routing_rules.delete(routing_rule_id="<id>")
# Use the SDK ...
Show Parameters
Show Parameters
The request object to use for the request.
Retrieve a RoutingRule
Retrieves the details of an existing routing rule by ID.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.routing_rules.retrieve(routing_rule_id="<id>")
# Handle response
print(res)
Show Parameters
Show Parameters
The request object to use for the request.
Show Response
Show Response
Update a RoutingRule
Partially updates an existing routing rule. Only provided fields are updated.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.routing_rules.update(routing_rule_id="<id>")
# Handle response
print(res)
Show Parameters
Show Parameters
The ID of the routing rule
Show Response
Show Response