Files
eveAI/eveai_app/views/document_forms.py
Josako 659588deab Changes Documents - llm and languagefields on tenant, processing on documents
first version of Adding Documents (excl. embeddings)
2024-05-02 00:12:27 +02:00

16 lines
718 B
Python

from flask_wtf import FlaskForm
from wtforms import (StringField, BooleanField, SubmitField, DateField,
SelectMultipleField, FieldList, FormField)
from wtforms.validators import DataRequired, Length, Optional
from flask_wtf.file import FileField, FileAllowed, FileRequired
class AddDocumentForm(FlaskForm):
file = FileField('File', validators=[FileAllowed(['pdf', 'txt']),
FileRequired()])
name = StringField('Name', validators=[Length(max=100)])
language = StringField('Language', validators=[Length(max=2)])
valid_from = DateField('Valid from', id='form-control datepicker', validators=[Optional()])
submit = SubmitField('Submit')