Organization Entities¶
LLMGW doesn't have a fixed entity model, you can define your own to best suit your business needs.
For each entity you can define
- entity_type: name of entity type
- required: whether entity is required in each LLM request
- allow_multiple: can multiple values of given entity type be set
- spend_limit: optional default spend limit for given entity type, if not set only configured entities are tracked
For more details on entity models and spend limits see Entity model.
Note: A default
spend_limitis a fallback — it applies only to entities of that type that have no explicit limit set in the admin portal. Projects and users almost always get explicit limits, so their defaults rarely take effect. Groups often do not, so thegroupsdefault is usually the real per-group cap.
Example of spend configuration file:¶
default_entity_types:
- entity_type: project
required: true
allow_multiple: false
spend_limit:
amount: 100
reset_period: DAY
- entity_type: user
required: true
allow_multiple: false
spend_limit:
amount: 100.0
reset_period: DAY
- entity_type: groups
required: false
allow_multiple: true
spend_limit:
amount: 100.0
reset_period: DAY