ReviewsSummaryProposeRequest reviews.summary-propose-request@1

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

Version
1.0.0
Owner
reviews
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/reviews/summary-propose-request.v1.json

reviews.summary-propose-request@1: the body of reviews.summary.propose on OpenVibe.Reviews (a service principal only: 403 summary.service_only): POST /api/v1/entities/:ref/summary/proposals { workflow: { id, run_id }, overview?, overview_signals?, pros?, cons?, stub_provider?, note? } proposes an AI summary revision (workflow reviews.summarize_entity) whose every pro and con cites live signals of the entity. It is stored with ai authorship, never published by this call and stays out of pages, feeds and Search until a person approves it. Unknown keys are refused, and nothing can carry a rating: 422 summary.rating_forbidden for a rating-like key, 422 summary.rating_in_text for a rating stated in the text. Other refusals: 400 authorship.workflow_required, 422 summary.invalid, summary.empty, summary.uncited_point, summary.invalid_citation; 409 entity.not_active.

Fields

FieldTypeRequiredDescriptionConstraints
workflowobjectyes
workflow.idstringyesThe OpenVibe.AI workflow, reviews.summarize_entity.
  • pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+$
workflow.run_idstringyesThe run (runId is read too).
  • minLength 1
workflow.runIdstring
workflow.versionany
workflow.modelstring
overviewstringAt most 6000 characters.
overview_signalsarray of stringThe signals the overview rests on (needed when there are no pros or cons).
  • items: pattern ^sig_[0-9A-HJKMNP-TV-Z]{26}$
prosarray of object
  • maxItems 12
  • items: no other fields
pros[].textstringyesAt most 600 characters once whitespace is collapsed.
  • minLength 1
pros[].signalsone ofyesThe live signals of the entity the point rests on (at least one).
consarray of object
  • maxItems 12
  • items: no other fields
cons[].textstringyesAt most 600 characters once whitespace is collapsed.
  • minLength 1
cons[].signalsone ofyesThe live signals of the entity the point rests on (at least one).
stub_providerbooleanThe run was answered by a stub provider (stubProvider is read too).
stubProviderboolean
notestring | nullGoes into the revision message.
expected_revisionanyAccepted and ignored by a proposal.
expectedRevisionanyAccepted and ignored by a proposal.
messageanyAccepted and ignored by a proposal.
publishanyAccepted and ignored by a proposal.
correction_noteanyAccepted and ignored by a proposal.
correction_idanyAccepted and ignored by a proposal.

Examples

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

Valid: proposal
{
  "workflow": {
    "id": "reviews.summarize_entity",
    "run_id": "run_01JAC8R9S0T1V2W3X4Y5Z6A7B8"
  },
  "overview": "Reviewers praise the comfort; battery life draws complaints.",
  "overview_signals": [
    "sig_01JAC2S3G4H5J6K7M8N9P0Q1R2"
  ],
  "pros": [
    {
      "text": "Comfortable over long sessions",
      "signals": [
        "sig_01JAC2S4G4H5J6K7M8N9P0Q1R2"
      ]
    }
  ],
  "cons": [
    {
      "text": "Battery life shorter than advertised",
      "signals": "sig_01JAC2S3G4H5J6K7M8N9P0Q1R2"
    }
  ]
}
Rejected: no-workflow
{
  "pros": [
    {
      "text": "Comfortable",
      "signals": [
        "sig_01JAC2S4G4H5J6K7M8N9P0Q1R2"
      ]
    }
  ]
}
Rejected: rating-field
{
  "workflow": {
    "id": "reviews.summarize_entity",
    "run_id": "run_01JAC8R9S0T1V2W3X4Y5Z6A7B8"
  },
  "overview": "Great.",
  "overview_signals": [
    "sig_01JAC2S3G4H5J6K7M8N9P0Q1R2"
  ],
  "rating": 4.5
}

Validate

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