Schemas: knowledge
Schemas whose first using operation belongs to the knowledge family. A shared schema is described once, here, and linked from every operation that uses it.
Descriptions come from the contract, which is written in French. They are reproduced verbatim so that the contract remains the source of truth.
AnswerIn
Question posee a la redaction par assistance.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
language | "fr" | "en" | yes | ||
module | string | null | no | pattern: "^[a-z]{2,16}$" | |
q | string | yes | Question libre. | minLength: 1 ; maxLength: 2000 |
Used by : knowledgeAnswer
AnswerOut
Reponse redigee par assistance, et les passages qu'elle designe.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
citations | array<SearchResultOut> | yes | ||
generated_by_assistance | true | no | Toujours vrai : ce texte est produit par un modele (Spec. A.11). | default: true |
model | string | yes | ||
prompt_version | string | yes | ||
quarantined | integer | yes | Passages trouves mais non transmis, signales comme instructions. | |
status | "answered" | "no_answer" | yes | ||
text | string | null | yes | Texte redige ; `null` pour une abstention. |
Used by : knowledgeAnswer
DocumentIn
Document propre a l'institution (Markdown restreint, sans HTML actif).
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
body | string | yes | minLength: 1 | |
fresh_as_of | string (date) | yes | ||
module | string | yes | minLength: 2 ; maxLength: 16 | |
required_roles | array<string> | no | Roles dont l'un au moins est exige pour lire ; vide : tout utilisateur. | |
title | string | yes | minLength: 1 ; maxLength: 200 | |
version | string | yes | minLength: 1 ; maxLength: 32 |
Used by : knowledgeDocumentPut
DocumentOut
Document de l'institution, texte et passages compris.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
body | string | yes | ||
content_sha256 | string | yes | ||
fresh_as_of | string (date) | yes | ||
key | string | yes | ||
language | "fr" | "en" | yes | ||
module | string | yes | ||
required_roles | array<string> | yes | ||
segments | array<nexclara_api__api__v1__knowledge__SegmentOut> | yes | ||
title | string | yes | ||
version | string | yes |
Used by : knowledgeCommonRead, knowledgeDocumentRead
DocumentPutOut
Effet d'un depot.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
document | DocumentSummaryOut | yes | ||
outcome | "added" | "updated" | "unchanged" | yes |
Used by : knowledgeDocumentPut
DocumentSummaryOut
Document de l'institution, sans son texte.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
content_sha256 | string | yes | ||
fresh_as_of | string (date) | yes | ||
key | string | yes | ||
language | "fr" | "en" | yes | ||
module | string | yes | ||
required_roles | array<string> | yes | ||
title | string | yes | ||
version | string | yes |
Used by : knowledgeDocumentList, knowledgeDocumentPut
SearchOut
Resultats d'une recherche : un passage par document, du plus pertinent au moins.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
language | "fr" | "en" | yes | ||
results | array<SearchResultOut> | yes | ||
terms | array<string> | yes | Termes retenus de la requete, plies. |
Used by : knowledgeSearch
SearchResultOut
Un document trouve, cite. Le passage est un extrait EXACT du document.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
document_key | string | yes | ||
fresh_as_of | string (date) | yes | ||
href | string | yes | Lien canonique : page du site, ou route de lecture. | |
instruction_like | boolean | yes | Le passage contient une formulation d'instruction adressee a un assistant ; il est montre comme du texte, jamais suivi. | |
module | string | yes | ||
passage | string | yes | ||
section | string | null | yes | Intertitre du passage, s'il en a un. | |
surface | "site" | "api" | yes | ||
title | string | yes | ||
version | string | yes | ||
visibility | "public" | "reserved" | "institution" | yes |
Used by : knowledgeAnswer, knowledgeSearch
nexclara_api__api__v1__knowledge__SegmentOut
Passage citable d'un document.
Type : object
| Property | Type | Required | Description | Constraints |
|---|---|---|---|---|
heading | string | null | yes | ||
instruction_like | boolean | yes | ||
ordinal | integer | yes | ||
text | string | yes |
Used by : knowledgeCommonRead, knowledgeDocumentRead