netorca_pack_profile - Manage NetOrca Pack service profiles¶
Part of the netautomate.netorca collection (version 2.0.0). Added in version 2.0.0.
Synopsis¶
- Create, update or delete a service's pack profile - the per-service settings of the NetOrca Pack framework (see netautomate.netorca.netorca_pack_profile_info for the concept).
- This is how a playbook turns Pack on for a service (
pack_enabled) and tunes how the service's knowledge documents are retrieved into AI processor prompts. - Each service has at most one profile, so
service_idalone identifies the target. If no profile exists, one is created; otherwise only the fields you supply are compared and updated, so the task is idempotent.
Requirements¶
The below requirements are needed on the host that executes this module.
- netorca-sdk >= 1.0.9, < 2.0.0
Parameters¶
| Parameter | Comments |
|---|---|
chunk_overlapint |
Characters of overlap between consecutive document chunks. |
cosine_similarity_thresholdfloat |
Minimum cosine similarity a chunk needs to be considered a match. |
embedding_modelstr |
Name of the embedding model used to index and query documents. |
max_charsint |
Maximum characters per document chunk. |
max_linesint |
Maximum lines per document chunk. |
pack_enabledbool |
The master switch - whether the Pack framework runs for this service at all. |
query_configdict |
Vector-query shaping - exclude_fields and exact_search lists.Compared as a whole when supplied. |
return_all_documentsbool |
Retrieve every document in full instead of the top_k best chunks. |
service_idintrequired |
ID of the service the profile belongs to. |
statestr |
Whether the profile should exist. Deleting a profile reverts the service to the platform defaults. Choices: present, absentDefault: present |
top_kint |
How many of the best-matching chunks are retrieved into a prompt. |
universal_executor_enabledbool |
Whether the platform-side universal executor handles this service's execution stage. |
Common parameters¶
Connection and query parameters shared by every module in the collection. See Authentication for the environment-variable pattern.
| Parameter | Comments |
|---|---|
contextstr |
Point of view for the request. The same query returns different data depending on which side of the service relationship your team is on.serviceowner operates on the services your team offers - the requests made against them, their service items and deployed items. This is the side that validates, approves, deploys and completes changes.consumer operates on what your team consumes - the service items your applications declared and the change instances tracking your own requests.If not set, the value of the NETORCA_CONTEXT environment variable is used.Choices: serviceowner, consumerDefault: serviceowner |
api_urlstrrequired |
Base URL of the NetOrca API, for example https://api.example.netorca.io.The URL is normalised to end in a single /v1, so passing it with or without the suffix both work.If not set, the value of the NETORCA_API_URL environment variable is used. |
api_keystrrequired |
API key of your NetOrca team. The NetOrca API supports API-key authentication only - there is no username/password mode. Treat the key like a password - supply it via the NETORCA_API_KEY environment variable (for example from a CI/CD secret) or from Ansible Vault, never as a literal in a playbook.If not set, the value of the NETORCA_API_KEY environment variable is used. |
validate_certsbool |
Whether to validate TLS certificates when talking to the API. Only disable this for lab instances with self-signed certificates. If not set, the value of the NETORCA_VALIDATE_CERTS environment variable is used.Default: true |
Attributes¶
| Attribute | Support | Description |
|---|---|---|
| check_mode | full | Create, update and delete are predicted from the fetched state without writing. |
| diff_mode | full | Returns before/after of exactly the fields that change. |
Notes¶
- All modules talk to the NetOrca REST API and are typically executed on the controller (
hosts=localhostwithgather_facts=false, ordelegate_to=localhost). - Module parameters take precedence over their
NETORCA_*environment variable fallbacks.
Examples¶
- name: Turn Pack on for the service
netautomate.netorca.netorca_pack_profile:
service_id: 49
pack_enabled: true
- name: Tune retrieval for a large knowledge base
netautomate.netorca.netorca_pack_profile:
service_id: 49
top_k: 20
cosine_similarity_threshold: 0.7
max_chars: 512
- name: Revert the service to platform defaults
netautomate.netorca.netorca_pack_profile:
service_id: 49
state: absent
Return values¶
msg¶
Human-readable summary of what happened.
- Returned: always
- Type:
str - Sample:
pack_profile¶
The pack profile after the operation (or the projected result in check mode).
- Returned: when
state=present - Type:
dict - Sample:
See also¶
- netautomate.netorca.netorca_pack_profile_info - Query profiles, including the resolved effective settings.
- netautomate.netorca.netorca_ai_document - Manage the knowledge documents this tuning applies to.
- netautomate.netorca.netorca_ai_processor - Manage the processors that consume the retrieved context.
Authors¶
- NetAutomate (@netautomate)