Setup of documents view

This commit is contained in:
Josako
2024-05-05 20:21:44 +02:00
parent 31250443c2
commit d925477e68
14 changed files with 467 additions and 61 deletions

View File

@@ -41,6 +41,26 @@ class Config(object):
SUPPORTED_EMBEDDINGS = ['openai.text-embedding-3-small', 'mistral.mistral-embed']
SUPPORTED_LLMS = ['openai.gpt-4-turbo', 'openai.gpt-3.5-turbo', 'mistral.mistral-large-2402']
# Celery settings
CELERY_TASK_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TIMEZONE = 'UTC'
CELERY_ENABLE_UTC = True
# Define multiple queues
CELERY_TASK_QUEUES = {
'embeddings': {
'exchange': 'embeddings',
'routing_key': 'embeddings.key',
'queue_arguments': {'x-max-priority': 10}
},
'llm_interactions': {
'exchange': 'llm_interactions',
'routing_key': 'llm_interactions.key',
'queue_arguments': {'x-max-priority': 5}
}
}
class DevConfig(Config):
DEVELOPMENT = True
@@ -61,6 +81,14 @@ class DevConfig(Config):
CELERY_BROKER_URL = 'redis://localhost:6379/0' # Default Redis configuration
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
# OpenAI API Keys
OPENAI_API_KEY = 'sk-proj-8R0jWzwjL7PeoPyMhJTZT3BlbkFJLb6HfRB2Hr9cEVFWEhU7'
# Unstructured settings
UNSTRUCTURED_API_KEY = 'pDgCrXumYhM3CNvjvwV8msMldXC3uw'
UNSTRUCTURED_BASE_URL = 'https://flowitbv-16c4us0m.api.unstructuredapp.io'
UNSTRUCTURED_FULL_URL = 'https://flowitbv-16c4us0m.api.unstructuredapp.io/general/v0/general'
class ProdConfig(Config):
DEVELOPMENT = False