FrameAskRequest frame.ask@1

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

Version
1.0.0
Owner
network
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/frame/ask.v1.json

frame.ask@1: the body of POST /api/frame/ask. One question on the chosen model, with the Search Fabric's results for the chosen sources in its prompt; the answer is a Network run whose AG-UI events are at GET /api/v1/runs/:id/events, and its ANSWER event carries { answer, citations: [{ n, title, url, site }] }. A person only: the person's own token pays OpenVibe.AI. model names a row from frame.choices@1, or its id (the OpenVibe source); omitted, the task's recommended choice answers. sources are what the answer may read: web (OpenVibe's index, then the paid ladder), openvibe (the network scope), mine (the person's own things) and page (the site's context). depth deep asks Search's deep ladder and gives the answer longer output. refs are typed references and files are Media ids; both go to the model on this turn.

Fields

FieldTypeRequiredDescriptionConstraints
textstringyesThe question.
  • minLength 1
  • maxLength 8000
modelone of
refsarray of object
  • items: no other fields
refs[].kindstringyes
  • maxLength 40
refs[].idstringyes
  • maxLength 100
refs[].titlestring
  • maxLength 200
refs[].urlstring
  • format uri
  • maxLength 2048
filesarray of one of
sourcesarray of enum
  • unique items
  • default ["web"]
  • items: one of "web", "openvibe", "mine", "page"
depthenum
  • one of "quick", "balanced", "deep"
  • default "balanced"
contextobject
  • no other fields
context.sitestring
  • maxLength 253
context.urlstring
  • format uri
  • maxLength 2048
context.titlestring
  • maxLength 300
context.kindstring
  • maxLength 40
context.idstring
  • maxLength 200
context.textstringThe page's text, when the site passes it.
  • maxLength 8000

Examples

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

Valid: balanced
{
  "text": "What changed in the search fabric this week?",
  "model": {
    "model": "openai/gpt-5-mini",
    "source": "openvibe"
  },
  "sources": [
    "web",
    "openvibe",
    "page"
  ],
  "depth": "balanced",
  "refs": [
    {
      "kind": "post",
      "id": "p_1",
      "title": "A post",
      "url": "https://openvibe.community/p/1"
    }
  ],
  "files": [
    "med_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3"
  ],
  "context": {
    "site": "openvibe.community",
    "url": "https://openvibe.community/p/1",
    "title": "A post",
    "kind": "post",
    "id": "p_1",
    "text": "The page."
  }
}
Rejected: no-text
{
  "sources": [
    "web"
  ],
  "depth": "balanced"
}

Validate

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