AlmondTill/G3N API

On this page

draftTrainingQuestions

query · in the family Training

What it does

Ask the assistant for candidate questions grounded on one play’s own words — shown to you, saved only when you keep one.

Draft up to count (1..10) candidate questions for ONE course through the assistant, GROUNDED on the play's own words alone — its title, its line, its steps and the operations' guide summaries. Every candidate is parsed one by one through the strict TrainingQuestionDraft schema; the invalid are DROPPED AND COUNTED (dropped). NOTHING is stored — save each kept one through createTrainingQuestion with source drafted. A metered AI read (office.training_draft) on the USER plane; requires the training-manage right. courseKey must be a live play key (VALIDATION otherwise); the assistant unavailable (keyless, a provider fault, an unreadable answer) answers INTEGRATION/UNAVAILABLE — write the questions by hand.

What happens

A drafting assist that spends kernels; nothing is stored, and a candidate that does not fit is dropped and counted.

Who may call it

Capability area: Training — Courses, tests, certificates and the training rules of your team.

Arguments

NameTypeRequiredNotes
courseKeyString String!yesNo further notes.
countInt Int!yesNo further notes.

Returns

TrainingQuestionDrafts TrainingQuestionDrafts! — The draft call's answer: the course, the kept candidates (at most the count asked) and how many the strict schema DROPPED — loud, never silent.

Example request

query ExampleDraftTrainingQuestions($courseKey: String!, $count: Int!) {
  draftTrainingQuestions(courseKey: $courseKey, count: $count) {
    courseKey
    dropped
  }
}

Variables:

{
  "courseKey": "<course key>",
  "count": 1
}

Example response

{
  "data": {
    "draftTrainingQuestions": {
      "courseKey": "<course key>",
      "dropped": 1
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer