mirror of
https://github.com/zoo-apps/papers.git
synced 2026-10-30 14:56:54 +00:00
53 lines
1.2 KiB
TeX
53 lines
1.2 KiB
TeX
\section{Experience Format JSON Schema}
|
|
|
|
|
|
\begin{lstlisting}[language=json,caption=Complete JSON Schema]
|
|
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"type": "object",
|
|
"required": ["version", "type", "content", "embedding"],
|
|
"properties": {
|
|
"version": {"type": "integer", "const": 1},
|
|
"type": {"type": "string", "const": "experience/v1"},
|
|
"content": {
|
|
"type": "object",
|
|
"required": ["text", "domain", "confidence"],
|
|
"properties": {
|
|
"text": {
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"pattern": "^(When|For|If|Before|After).*"
|
|
},
|
|
"domain": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"minItems": 1,
|
|
"maxItems": 5
|
|
},
|
|
"confidence": {
|
|
"type": "number",
|
|
"minimum": 0,
|
|
"maximum": 1
|
|
}
|
|
}
|
|
},
|
|
"embedding": {
|
|
"type": "array",
|
|
"items": {"type": "number"},
|
|
"minItems": 768,
|
|
"maxItems": 768
|
|
},
|
|
"metadata": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created": {"type": "integer"},
|
|
"author": {"type": "string"},
|
|
"source": {"type": "string"}
|
|
}
|
|
},
|
|
"signature": {"type": "string"}
|
|
}
|
|
}
|
|
\end{lstlisting}
|
|
|