Hub
Search Hub
Returns hub items available to the current workspace, sorted by display name.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.hub.search()
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.hub.search();
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"q": Optional[str],
"types": List[str], # optional
}
{
q?: string;
types?: string[];
}
Show Response
Show Response
{
"hits": [{
"document": {
"id": str,
"entity_id": Optional[str],
"display_name": str,
"description": str,
"type": str,
},
}],
}
{
hits: {
document: {
id: string;
entityId?: string;
displayName: string;
description: string;
type: string;
};
}[];
}
Retrieve a Hub
Retrieves a hub item available to the current workspace.from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.hub.get(id="<id>")
# Handle response
print(res)
import { Orq } from "@orq-ai/node";
const orq = new Orq({
apiKey: process.env["ORQ_API_KEY"] ?? "",
});
async function run() {
const result = await orq.hub.get({
id: "<id>",
});
console.log(result);
}
run();
Show Parameters
Show Parameters
{
"id": str, # required
}
{
id: string; // required
}
Show Response
Show Response
{
"hub_item": {
"id": Optional[str],
"entity_id": str,
"display_name": str,
"description": str,
"type": str,
"is_active": Optional[bool],
"is_private": Optional[bool],
"is_provided_by_orq": Optional[bool],
"engine": Optional[str],
"key": Optional[str],
"evaluator": Dict[str, Any], # optional
"prompt": Dict[str, Any], # optional
},
}
{
hubItem: {
id?: string;
entityId: string;
displayName: string;
description: string;
type: string;
isActive?: boolean;
isPrivate?: boolean;
isProvidedByOrq?: boolean;
engine?: string;
key?: string;
evaluator?: Record<string, unknown>;
prompt?: Record<string, unknown>;
};
}