- Modernized authentication with the introduction of TenantProject
- Created a base mail template - Adapt and improve document API to usage of catalogs and processors - Adapt eveai_sync to new authentication mechanism and usage of catalogs and processors
This commit is contained in:
0
config/type_defs/__init__.py
Normal file
0
config/type_defs/__init__.py
Normal file
29
config/type_defs/catalog_types.py
Normal file
29
config/type_defs/catalog_types.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Catalog Types
|
||||
CATALOG_TYPES = {
|
||||
"STANDARD_CATALOG": {
|
||||
"name": "Standard Catalog",
|
||||
"Description": "A Catalog with information in Evie's Library, to be considered as a whole",
|
||||
"configuration": {},
|
||||
"document_version_configurations": []
|
||||
},
|
||||
"DOSSIER": {
|
||||
"name": "Dossier Catalog",
|
||||
"Description": "A Catalog with information in Evie's Library in which several Dossiers can be stored",
|
||||
"configuration": {
|
||||
"tagging_fields": {
|
||||
"name": "Tagging Fields",
|
||||
"type": "tagging_fields",
|
||||
"description": """Define the metadata fields that will be used for tagging documents.
|
||||
Each field must have:
|
||||
- type: one of 'string', 'integer', 'float', 'date', 'enum'
|
||||
- required: boolean indicating if the field is mandatory
|
||||
- description: field description
|
||||
- allowed_values: list of values (for enum type only)
|
||||
- min_value/max_value: range limits (for numeric types only)""",
|
||||
"required": True,
|
||||
"default": {},
|
||||
}
|
||||
},
|
||||
"document_version_configurations": ["tagging_fields"]
|
||||
},
|
||||
}
|
||||
56
config/type_defs/processor_types.py
Normal file
56
config/type_defs/processor_types.py
Normal file
@@ -0,0 +1,56 @@
|
||||
# Catalog Types
|
||||
PROCESSOR_TYPES = {
|
||||
"HTML_PROCESSOR": {
|
||||
"name": "HTML Processor",
|
||||
"file_types": "html",
|
||||
"Description": "A processor for HTML files",
|
||||
"configuration": {
|
||||
"html_tags": {
|
||||
"name": "HTML Tags",
|
||||
"type": "string",
|
||||
"description": "A comma-separated list of HTML tags",
|
||||
"required": True,
|
||||
"default": "p, h1, h2, h3, h4, h5, h6, li, table, thead, tbody, tr, td"
|
||||
},
|
||||
"html_end_tags": {
|
||||
"name": "HTML End Tags",
|
||||
"type": "string",
|
||||
"description": "A comma-separated list of HTML end tags (where can the chunk end)",
|
||||
"required": True,
|
||||
"default": "p, li, table"
|
||||
},
|
||||
"html_included_elements": {
|
||||
"name": "HTML Included Elements",
|
||||
"type": "string",
|
||||
"description": "A comma-separated list of elements to be included",
|
||||
"required": True,
|
||||
"default": "article, main"
|
||||
},
|
||||
"html_excluded_elements": {
|
||||
"name": "HTML Excluded Elements",
|
||||
"type": "string",
|
||||
"description": "A comma-separated list of elements to be excluded",
|
||||
"required": False,
|
||||
"default": "header, footer, nav, script"
|
||||
},
|
||||
"html_excluded_classes": {
|
||||
"name": "HTML Excluded Classes",
|
||||
"type": "string",
|
||||
"description": "A comma-separated list of classes to be excluded",
|
||||
"required": False,
|
||||
},
|
||||
},
|
||||
},
|
||||
"PDF_PROCESSOR": {
|
||||
"name": "PDF Processor",
|
||||
"file_types": "pdf",
|
||||
"Description": "A Processor for PDF files",
|
||||
"configuration": {}
|
||||
},
|
||||
"AUDIO_PROCESSOR": {
|
||||
"name": "AUDIO Processor",
|
||||
"file_types": "mp3, mp4, ogg",
|
||||
"Description": "A Processor for audio files",
|
||||
"configuration": {}
|
||||
},
|
||||
}
|
||||
31
config/type_defs/retriever_types.py
Normal file
31
config/type_defs/retriever_types.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Retriever Types
|
||||
RETRIEVER_TYPES = {
|
||||
"STANDARD_RAG": {
|
||||
"name": "Standard RAG Retriever",
|
||||
"description": "Retrieving all embeddings conform the query",
|
||||
"configuration": {
|
||||
"es_k": {
|
||||
"name": "es_k",
|
||||
"type": "int",
|
||||
"description": "K-value to retrieve embeddings (max embeddings retrieved)",
|
||||
"required": True,
|
||||
"default": 8,
|
||||
},
|
||||
"es_similarity_threshold": {
|
||||
"name": "es_similarity_threshold",
|
||||
"type": "float",
|
||||
"description": "Similarity threshold for retrieving embeddings",
|
||||
"required": True,
|
||||
"default": 0.3,
|
||||
},
|
||||
},
|
||||
"arguments": {
|
||||
"query": {
|
||||
"name": "query",
|
||||
"type": "str",
|
||||
"description": "Query to retrieve embeddings",
|
||||
"required": True,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
11
config/type_defs/service_types.py
Normal file
11
config/type_defs/service_types.py
Normal file
@@ -0,0 +1,11 @@
|
||||
# Specialist Types
|
||||
SERVICE_TYPES = {
|
||||
"CHAT": {
|
||||
"name": "CHAT",
|
||||
"description": "Service allows to use CHAT functionality.",
|
||||
},
|
||||
"DOCAPI": {
|
||||
"name": "DOCAPI",
|
||||
"description": "Service allows to use document API functionality.",
|
||||
},
|
||||
}
|
||||
62
config/type_defs/specialist_types.py
Normal file
62
config/type_defs/specialist_types.py
Normal file
@@ -0,0 +1,62 @@
|
||||
# Specialist Types
|
||||
SPECIALIST_TYPES = {
|
||||
"STANDARD_RAG": {
|
||||
"name": "Q&A RAG Specialist",
|
||||
"description": "Standard Q&A through RAG Specialist",
|
||||
"configuration": {
|
||||
"specialist_context": {
|
||||
"name": "Specialist Context",
|
||||
"type": "text",
|
||||
"description": "The context to be used by the specialist.",
|
||||
"required": False,
|
||||
},
|
||||
"temperature": {
|
||||
"name": "Temperature",
|
||||
"type": "number",
|
||||
"description": "The inference temperature to be used by the specialist.",
|
||||
"required": False,
|
||||
"default": 0.3
|
||||
}
|
||||
},
|
||||
"arguments": {
|
||||
"language": {
|
||||
"name": "Language",
|
||||
"type": "str",
|
||||
"description": "Language code to be used for receiving questions and giving answers",
|
||||
"required": True,
|
||||
},
|
||||
"query": {
|
||||
"name": "query",
|
||||
"type": "str",
|
||||
"description": "Query to answer",
|
||||
"required": True,
|
||||
}
|
||||
},
|
||||
"results": {
|
||||
"detailed_query": {
|
||||
"name": "detailed_query",
|
||||
"type": "str",
|
||||
"description": "The query detailed with the Chat Session History.",
|
||||
"required": True,
|
||||
},
|
||||
"answer": {
|
||||
"name": "answer",
|
||||
"type": "str",
|
||||
"description": "Answer to the query",
|
||||
"required": True,
|
||||
},
|
||||
"citations": {
|
||||
"name": "citations",
|
||||
"type": "List[str]",
|
||||
"description": "List of citations",
|
||||
"required": False,
|
||||
},
|
||||
"insufficient_info": {
|
||||
"name": "insufficient_info",
|
||||
"type": "bool",
|
||||
"description": "Whether or not the query is insufficient info",
|
||||
"required": True,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user