File size: 3,132 Bytes
203f582
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from django.core.exceptions import ValidationError
#from django.utils.translation import gettext_lazy as _

from django import forms

class RenewBotForm(forms.Form):
    query = forms.CharField(
            help_text="Unesite upit: ")
    jezik = forms.CharField(
            help_text="Odaberite jezik")
#    def clean_query(self):
#        data = self.cleaned_data['query']
#        data = self.cleaned_data['jezik']
#        return data

class EditorForm(forms.Form):
    id = forms.CharField(help_text="id")
    state = forms.CharField(help_text="Početno stanje")
    next = forms.CharField(help_text="Završno stanje")
    page = forms.IntegerField(help_text="Stranica")
    used = forms.CharField(help_text="Upotrebljen (Bool)")
    docu = forms.CharField(help_text="Dokument konteksta")
    source = forms.CharField(help_text="URL dokumenta")
    jezik = forms.CharField(help_text="Odaberite jezik")
#    def clean_query(self):
#        data = self.cleaned_data['source']
#        return data

class EditorListForm(forms.Form):
    f_id = forms.IntegerField(help_text="id filter")
    f_jezik = forms.CharField(help_text="jezik filter")
    f_state = forms.CharField(help_text="state filter")
    f_next = forms.CharField(help_text="next filter")
    f_page = forms.IntegerField(help_text="page filter")
    f_docu = forms.CharField(help_text="document filter")

class ParamForm(forms.Form):
          system = forms.CharField(help_text="Enter parameter value")
          ctxpre = forms.CharField(help_text="Enter parameter value")
          msg_content = forms.CharField(help_text="Enter parameter value")
          min_len = forms.IntegerField(help_text="Enter parameter value")
          CHUNK_SIZE = forms.IntegerField(help_text="Enter parameter value")
          CHUNK_OVERLAP = forms.IntegerField(help_text="Enter parameter value")
          max_results = forms.IntegerField(help_text="Enter parameter value")
          EMBED_MODEL = forms.CharField(help_text="Enter parameter value")
          model_id = forms.CharField(help_text="Enter parameter value")
          max_results = forms.IntegerField(help_text="Enter parameter value")
          max_conv = forms.IntegerField(help_text="Enter parameter value")
          min_len = forms.IntegerField(help_text="Enter parameter value")
          min_distance = forms.FloatField(help_text="Enter parameter value")
          max_distance = forms.FloatField(help_text="Enter parameter value")
          temperature = forms.FloatField(help_text="Enter parameter value")
          max_tokens = forms.IntegerField(help_text="Enter parameter value")
          top_p = forms.FloatField(help_text="Enter parameter value")
          frequency_penalty = forms.FloatField(help_text="Enter parameter value")
          presence_penalty = forms.FloatField(help_text="Enter parameter value")
          DEBUG = forms.CharField(help_text="Enter parameter value (Bool)")
          jezik = forms.CharField(help_text="Uneti jezik")

class ImportForm(forms.Form):
    path = forms.CharField(help_text="Unesite putanju do PDF dokumenta")
    jezik = forms.CharField(help_text="Unesite jezik")