- Adding a Tenant Type
- Allow filtering on Tenant Types & searching for parts of Tenant names - Implement health checks - Start Prometheus monitoring (needs to be finalized) - Refine audio_processor and srt_processor to reduce duplicate code and support for larger files - Introduce repopack to reason in LLMs about the code
This commit is contained in:
@@ -2,7 +2,7 @@ from flask import current_app
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (StringField, PasswordField, BooleanField, SubmitField, EmailField, IntegerField, DateField,
|
||||
SelectField, SelectMultipleField, FieldList, FormField, FloatField, TextAreaField)
|
||||
from wtforms.validators import DataRequired, Length, Email, NumberRange, Optional
|
||||
from wtforms.validators import DataRequired, Length, Email, NumberRange, Optional, ValidationError
|
||||
import pytz
|
||||
|
||||
from common.models.user import Role
|
||||
@@ -18,6 +18,8 @@ class TenantForm(FlaskForm):
|
||||
timezone = SelectField('Timezone', choices=[], validators=[DataRequired()])
|
||||
# RAG context
|
||||
rag_context = TextAreaField('RAG Context', validators=[Optional()])
|
||||
# Tenant Type
|
||||
type = SelectField('Tenant Type', validators=[Optional()], default='Active')
|
||||
# LLM fields
|
||||
embedding_model = SelectField('Embedding Model', choices=[], validators=[DataRequired()])
|
||||
llm_model = SelectField('Large Language Model', choices=[], validators=[DataRequired()])
|
||||
@@ -65,6 +67,7 @@ class TenantForm(FlaskForm):
|
||||
# Initialize fallback algorithms
|
||||
self.fallback_algorithms.choices = \
|
||||
[(algorithm, algorithm.lower()) for algorithm in current_app.config['FALLBACK_ALGORITHMS']]
|
||||
self.type.choices = [('', 'Select Type')] + [(t, t) for t in current_app.config['TENANT_TYPES']]
|
||||
|
||||
|
||||
class BaseUserForm(FlaskForm):
|
||||
@@ -107,4 +110,14 @@ class TenantDomainForm(FlaskForm):
|
||||
submit = SubmitField('Add Domain')
|
||||
|
||||
|
||||
class TenantSelectionForm(FlaskForm):
|
||||
types = SelectMultipleField('Tenant Types', choices=[], validators=[Optional()])
|
||||
search = StringField('Search', validators=[Optional()])
|
||||
submit = SubmitField('Filter')
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(TenantSelectionForm, self).__init__(*args, **kwargs)
|
||||
self.types.choices = [(t, t) for t in current_app.config['TENANT_TYPES']]
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user