Pack Profiles
A pack profile is the configuration record that ties a service's AI pack together — linking processors, validators, and documents into a unified, resolved configuration. When the AI pack runs for a service, it reads the active pack profile to know which components to use.
Accessed via client.pack_profiles.
Model properties
| Property | Type | Description |
|---|---|---|
id |
int |
Profile ID |
service |
str |
Service reference |
pack_enabled |
bool |
Whether the Pack system is enabled for this service |
universal_executor_enabled |
bool |
Whether the Universal Executor layer is active |
embedding_model |
str |
Embedding model identifier |
chunk_overlap |
int |
Number of overlapping tokens between document chunks |
max_lines |
int |
Maximum lines per document chunk |
max_chars |
int |
Maximum characters per document chunk |
top_k |
int |
Number of top documents to retrieve per query |
return_all_documents |
bool |
Return all documents instead of top-k |
cosine_similarity_threshold |
float |
Minimum similarity score for document retrieval |
query_config |
dict |
Advanced vector query configuration (exclude_fields, exact_search) |
Methods
list(**filters)
Returns a lazy generator of all pack profiles.
Filters:
| Filter | Type | Description |
|---|---|---|
service_id |
int |
Filter by service |
ordering |
str |
Sort field — prefix with - for descending |
filter(**filters)
Same as list() but returns all results as a list. Accepts the same filters.
profiles = client.pack_profiles.filter(service_id=45)
print(f"{len(profiles)} profiles for this service")
get(id)
Retrieves a single pack profile by ID.
profile = client.pack_profiles.get(5)
print(profile.id)
print(profile.pack_enabled)
print(profile.top_k)
print(profile.chunk_overlap)
print(profile.embedding_model)
create(data)
Not supported. Raises NotImplementedError. Use create_for_service() instead.
create_for_service(service_id, data=None)
Creates a pack profile for a service.
| Parameter | Type | Description |
|---|---|---|
service_id |
int |
Service to create the profile for |
data |
dict |
Optional profile configuration |
profile = client.pack_profiles.create_for_service(
service_id=45,
data={"pack_enabled": True, "top_k": 5}
)
print(profile.id)
update(id, data, partial=True)
Updates a pack profile by its ID. Defaults to PATCH.
| Parameter | Type | Description |
|---|---|---|
id |
int |
Profile ID |
data |
dict |
Fields to update |
partial |
bool |
True (default) = PATCH, False = PUT |
client.pack_profiles.update(5, {"top_k": 10})
client.pack_profiles.update(5, {"pack_enabled": False})
update_for_service(service_id, data, partial=True)
Updates the pack profile for a service without needing to look up the profile ID first. Uses the service-scoped endpoint.
| Parameter | Type | Description |
|---|---|---|
service_id |
int |
Service whose profile to update |
data |
dict |
Fields to update |
partial |
bool |
True (default) = PATCH, False = PUT |
client.pack_profiles.update_for_service(service_id=45, data={"pack_enabled": True})
client.pack_profiles.update_for_service(service_id=45, data={"top_k": 10})
delete(id)
Not supported. Raises NotImplementedError.
by_service(service_id)
Returns all pack profiles for a specific service as a list. Shortcut for filter(service_id=service_id).
profiles = client.pack_profiles.by_service(service_id=45)
for p in profiles:
print(p.id, p.pack_enabled)
get_service_config(service_id)
Returns the resolved configuration that the AI pack will actually use at runtime for a service — with all defaults applied and components resolved. Returns a dict. Use this to confirm what the pack will do before a change instance arrives.
| Parameter | Type | Description |
|---|---|---|
service_id |
int |
Service to get the resolved config for |