ExchangeRequestPreset exchange.request-preset@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
exchange
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-025
Schema
https://openvibe.network/contracts/exchange/request-preset.v1.json

A person-owned request preset with model fallbacks, system prompt, routing and sampling defaults.

Fields

FieldTypeRequiredDescriptionConstraints
modelstring
  • minLength 1
  • maxLength 256
modelsarray of string
  • minItems 1
  • maxItems 8
  • items: minLength 1
  • items: maxLength 256
providerobject
  • no other fields
provider.orderarray of string
  • maxItems 64
  • unique items
  • items: pattern ^[a-zA-Z0-9._-]{1,100}$
provider.onlyarray of string
  • maxItems 64
  • unique items
  • items: pattern ^[a-zA-Z0-9._-]{1,100}$
provider.ignorearray of string
  • maxItems 64
  • unique items
  • items: pattern ^[a-zA-Z0-9._-]{1,100}$
provider.allow_fallbacksboolean
provider.sortenum
  • one of "price", "throughput", "latency", "quality", "value"
provider.max_priceobject
  • no other fields
provider.max_price.promptnumber
  • minimum 0
provider.max_price.completionnumber
  • minimum 0
provider.data_collectionenum
  • one of "allow", "deny"
provider.zdrboolean
namestringyes
  • pattern ^[a-z0-9][a-z0-9_-]{0,63}$
systemstring
  • maxLength 32000
temperaturenumber
  • minimum 0
  • maximum 2
top_pnumber
  • minimum 0
  • maximum 1
max_tokensinteger
  • minimum 1
  • maximum 64000
seedinteger
response_formatobject

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: example
{
  "name": "writer",
  "model": "maker/model",
  "system": "Write clearly",
  "provider": {
    "sort": "price"
  }
}
Rejected: example
{
  "name": "writer",
  "model": "maker/model",
  "temperature": 3
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('exchange.request-preset@1', value);   // { valid, errors: [{ path, message }] }