Schémas : knowledge
Schémas dont la première opération qui les emploie appartient à la famille knowledge. Un schéma partagé est décrit une seule fois, ici, et lié depuis toutes les opérations qui l'emploient.
Les descriptions viennent du contrat, rédigé en français. Elles sont reproduites telles quelles pour rester la source de vérité.
AnswerIn
Question posee a la redaction par assistance.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
language | "fr" | "en" | oui | ||
module | string | null | non | pattern: "^[a-z]{2,16}$" | |
q | string | oui | Question libre. | minLength: 1 ; maxLength: 2000 |
Employé par : knowledgeAnswer
AnswerOut
Reponse redigee par assistance, et les passages qu'elle designe.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
citations | array<SearchResultOut> | oui | ||
generated_by_assistance | true | non | Toujours vrai : ce texte est produit par un modele (Spec. A.11). | default: true |
model | string | oui | ||
prompt_version | string | oui | ||
quarantined | integer | oui | Passages trouves mais non transmis, signales comme instructions. | |
status | "answered" | "no_answer" | oui | ||
text | string | null | oui | Texte redige ; `null` pour une abstention. |
Employé par : knowledgeAnswer
DocumentIn
Document propre a l'institution (Markdown restreint, sans HTML actif).
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
body | string | oui | minLength: 1 | |
fresh_as_of | string (date) | oui | ||
module | string | oui | minLength: 2 ; maxLength: 16 | |
required_roles | array<string> | non | Roles dont l'un au moins est exige pour lire ; vide : tout utilisateur. | |
title | string | oui | minLength: 1 ; maxLength: 200 | |
version | string | oui | minLength: 1 ; maxLength: 32 |
Employé par : knowledgeDocumentPut
DocumentOut
Document de l'institution, texte et passages compris.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
body | string | oui | ||
content_sha256 | string | oui | ||
fresh_as_of | string (date) | oui | ||
key | string | oui | ||
language | "fr" | "en" | oui | ||
module | string | oui | ||
required_roles | array<string> | oui | ||
segments | array<nexclara_api__api__v1__knowledge__SegmentOut> | oui | ||
title | string | oui | ||
version | string | oui |
Employé par : knowledgeCommonRead, knowledgeDocumentRead
DocumentPutOut
Effet d'un depot.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
document | DocumentSummaryOut | oui | ||
outcome | "added" | "updated" | "unchanged" | oui |
Employé par : knowledgeDocumentPut
DocumentSummaryOut
Document de l'institution, sans son texte.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
content_sha256 | string | oui | ||
fresh_as_of | string (date) | oui | ||
key | string | oui | ||
language | "fr" | "en" | oui | ||
module | string | oui | ||
required_roles | array<string> | oui | ||
title | string | oui | ||
version | string | oui |
Employé par : knowledgeDocumentList, knowledgeDocumentPut
SearchOut
Resultats d'une recherche : un passage par document, du plus pertinent au moins.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
language | "fr" | "en" | oui | ||
results | array<SearchResultOut> | oui | ||
terms | array<string> | oui | Termes retenus de la requete, plies. |
Employé par : knowledgeSearch
SearchResultOut
Un document trouve, cite. Le passage est un extrait EXACT du document.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
document_key | string | oui | ||
fresh_as_of | string (date) | oui | ||
href | string | oui | Lien canonique : page du site, ou route de lecture. | |
instruction_like | boolean | oui | Le passage contient une formulation d'instruction adressee a un assistant ; il est montre comme du texte, jamais suivi. | |
module | string | oui | ||
passage | string | oui | ||
section | string | null | oui | Intertitre du passage, s'il en a un. | |
surface | "site" | "api" | oui | ||
title | string | oui | ||
version | string | oui | ||
visibility | "public" | "reserved" | "institution" | oui |
Employé par : knowledgeAnswer, knowledgeSearch
nexclara_api__api__v1__knowledge__SegmentOut
Passage citable d'un document.
Type : object
| Propriété | Type | Requis | Description | Contraintes |
|---|---|---|---|---|
heading | string | null | oui | ||
instruction_like | boolean | oui | ||
ordinal | integer | oui | ||
text | string | oui |
Employé par : knowledgeCommonRead, knowledgeDocumentRead