AiRunCreateRequest ai.run-create-request@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
ai
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/ai/run-create-request.v1.json

ai.run-create-request@1: bodies of ai.run.create on OpenVibe.AI. POST /api/v1/runs: ai.run-request@1. POST /api/v1/chat, /generate, /summarize, /classify, /extract, /enrich and /embed: a run of workflow ai.<op> whose input is the body itself (validated by that workflow's own input schema), except idempotency_key, target, attribution, on_behalf_of and options, which are the run's. POST /api/v1/runs/:id/citations: { citations } (1-50, each with a source_type; the requester only). POST /api/v1/runs/:id/cancel and /retry take no body.

Fields

This schema has no named fields.

Examples

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

Valid: citations
{
  "citations": [
    {
      "source_type": "wiki.page",
      "url": "https://openvibe.wiki/openvibe/restreaming",
      "title": "Restreaming"
    }
  ]
}
Valid: direct-summarize
{
  "text": "Summarize this stream recap.",
  "options": {
    "max_words": 80
  },
  "idempotency_key": "recap-812"
}
Valid: run
{
  "workflow": "network.site_copy",
  "input": {
    "sites": []
  }
}
Rejected: array
[
  "not",
  "an",
  "object"
]

Validate

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