Source¶
- pydantic model schemas.source.SourceBase¶
Base class for Source
Show JSON schema
{ "title": "SourceBase", "description": "Base class for Source", "type": "object", "properties": { "url": { "title": "Url", "type": "string" } }, "required": [ "url" ] }
- Fields:
- field url: str [Required]¶
Not necessarily a URL, but a string that identifies the source. Can be a pathfile or a user ID for example.
- pydantic model schemas.source.SourceCreate¶
Create class for Source
Show JSON schema
{ "title": "SourceCreate", "description": "Create class for Source", "type": "object", "properties": { "url": { "title": "Url", "type": "string" } }, "required": [ "url" ] }
- Fields:
- field url: str [Required]¶
Not necessarily a URL, but a string that identifies the source. Can be a pathfile or a user ID for example.
- pydantic model schemas.source.Source¶
Class for Source
Show JSON schema
{ "title": "Source", "description": "Class for Source", "type": "object", "properties": { "url": { "title": "Url", "type": "string" }, "id": { "title": "Id", "type": "integer" }, "questions": { "default": [], "items": { "$ref": "#/$defs/FaqQuestionBase" }, "title": "Questions", "type": "array" }, "documents": { "default": [], "items": { "$ref": "#/$defs/DocumentBase" }, "title": "Documents", "type": "array" } }, "$defs": { "DocumentBase": { "description": "Base class for Document", "properties": { "text": { "title": "Text", "type": "string" }, "url": { "title": "Url", "type": "string" }, "language": { "default": null, "title": "Language", "type": "string" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "subtopics": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Subtopics" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Summary" }, "hyq": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Hyq" }, "hyq_declarative": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Hyq Declarative" }, "doctype": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Doctype" }, "organizations": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Organizations" }, "user_uuid": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User Uuid" } }, "required": [ "text", "url" ], "title": "DocumentBase", "type": "object" }, "FaqQuestionBase": { "description": "Base class for Question", "properties": { "text": { "title": "Text", "type": "string" }, "url": { "title": "Url", "type": "string" }, "language": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Language" }, "tags": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Tags" }, "subtopics": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Subtopics" }, "summary": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Summary" }, "hyq": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Hyq" }, "hyq_declarative": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Hyq Declarative" }, "doctype": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Doctype" }, "organizations": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Organizations" } }, "required": [ "text", "url" ], "title": "FaqQuestionBase", "type": "object" } }, "required": [ "url", "id" ] }
- Config:
from_attributes: bool = True
- Fields:
- field documents: list[DocumentBase] = []¶
A list of documents from this source
- field id: int [Required]¶
- field questions: list[FaqQuestionBase] = []¶
A list of questions from this source
- field url: str [Required]¶
Not necessarily a URL, but a string that identifies the source. Can be a pathfile or a user ID for example.