ChatVibeAnswerV2 chat.vibe-answer@2

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

Version
2.0.0
Owner
chat
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/chat/vibe-answer.v2.json

chat.vibe-answer@2: one answer to a person's Vibe question, from an explicit model selection. A question may carry one to three of these independently.

Fields

FieldTypeRequiredDescriptionConstraints
modelstringyes
  • minLength 2
  • maxLength 256
statusenumyes
  • one of "writing", "finished", "failed"
textstringyes
  • maxLength 8000
providerstring | null
cost_usdnumber | null
  • minimum 0
msinteger | null
  • minimum 0
run_idstring | null
errorstring
  • maxLength 250

Examples

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

Valid: finished
{
  "model": "deepseek/deepseek-chat",
  "status": "finished",
  "text": "Hello.",
  "provider": "deepseek",
  "cost_usd": 0.0002,
  "ms": 420,
  "run_id": "run_example"
}
Rejected: no-model
{
  "status": "finished",
  "text": "Hello."
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('chat.vibe-answer@2', value);   // { valid, errors: [{ path, message }] }