Variables for rag_context and fallback algorithms added to Tenant and parts of the implementation.

This commit is contained in:
Josako
2024-06-13 15:23:35 +02:00
parent cbddaee810
commit b77e1ab321
6 changed files with 63 additions and 17 deletions

View File

@@ -45,18 +45,20 @@ def tenant():
if form.validate_on_submit():
current_app.logger.debug('Creating new tenant')
# Handle the required attributes
new_tenant = Tenant(name=form.name.data,
website=form.website.data,
default_language=form.default_language.data,
allowed_languages=form.allowed_languages.data,
timezone=form.timezone.data,
embedding_model=form.embedding_model.data,
llm_model=form.llm_model.data,
license_start_date=form.license_start_date.data,
license_end_date=form.license_end_date.data,
allowed_monthly_interactions=form.allowed_monthly_interactions.data,
embed_tuning=form.embed_tuning.data,
rag_tuning=form.rag_tuning.data)
new_tenant = Tenant()
form.populate_obj(new_tenant)
# new_tenant = Tenant(name=form.name.data,
# website=form.website.data,
# default_language=form.default_language.data,
# allowed_languages=form.allowed_languages.data,
# timezone=form.timezone.data,
# embedding_model=form.embedding_model.data,
# llm_model=form.llm_model.data,
# license_start_date=form.license_start_date.data,
# license_end_date=form.license_end_date.data,
# allowed_monthly_interactions=form.allowed_monthly_interactions.data,
# embed_tuning=form.embed_tuning.data,
# rag_tuning=form.rag_tuning.data)
# Handle Embedding Variables
new_tenant.html_tags = form.html_tags.data.split(',') if form.html_tags.data else []