File size: 4,610 Bytes
461adca
 
 
 
 
 
 
0c2542b
461adca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a765e3e
 
 
 
db52560
461adca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492b465
 
a765e3e
 
 
461adca
 
 
 
 
 
 
 
a765e3e
 
 
 
 
461adca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
492b465
 
a765e3e
 
461adca
 
 
 
 
 
 
 
a765e3e
 
 
 
 
461adca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# Default configuration for Legal Position AI Analyzer

app:
  name: "Legal Position AI Analyzer"
  version: "1.0.0"
  debug: false
  environment: "production"
  debug_prompts: false

# AWS S3 Configuration
aws:
  bucket_name: "legal-position"
  region: "eu-north-1"
  prefix_retriever: "Save_Index_Ivan/"
  local_dir: "Save_Index_Ivan"

# LlamaIndex Settings
llama_index:
  context_window: 20000
  chunk_size: 2048
  similarity_top_k: 20
  embed_model: "text-embedding-3-small"

# Generation Settings
generation:
  max_tokens:
    openai: 8192
    anthropic: 16000
    gemini: 8192
    deepseek: 8192
  max_tokens_analysis: 4000
  temperature: 0.5

# Model Providers Configuration
models:
  # Default provider for UI (used in interface.py)
  default_provider: "anthropic"

  providers:
    - openai
    - anthropic
    - gemini
    - deepseek

  # Generation Models
  generation:
    openai:
      - name: "gpt-5.2"
        display_name: "GPT-5.2"
        default: true
      - name: "gpt-5-mini"
        display_name: "GPT-5 Mini"
      - name: "gpt-4.1"
        display_name: "GPT-4.1"
      - name: "ft:gpt-4o-mini-2024-07-18:personal:lp-1700-part-cd-120:AqhCe5Aq"
        display_name: "GPT-4o Mini FT1"
      - name: "ft:gpt-4o-mini-2024-07-18:personal:legal-position-1700:AbNt5I2x"
        display_name: "GPT-4o Mini FT2"

    anthropic:
      - name: "claude-opus-4-6"
        display_name: "Claude Opus 4.6"
      - name: "claude-sonnet-4-6"
        display_name: "Claude Sonnet 4.6"
        default: true
      - name: "claude-haiku-4-5-20251001"
        display_name: "Claude Haiku 4.5"

    gemini:
      - name: "gemini-3-flash-preview"
        display_name: "Gemini 3 Flash"
      - name: "gemini-3-pro-preview"
        display_name: "Gemini 3 Pro"

    deepseek:
      - name: "deepseek-chat"
        display_name: "DeepSeek Chat"

  # Analysis Models
  analysis:
    openai:
      - name: "gpt-5.2"
        display_name: "GPT-5.2"
      - name: "gpt-5-mini"
        display_name: "GPT-5 Mini"
      - name: "gpt-4.1"
        display_name: "GPT-4.1"
      - name: "gpt-4o"
        display_name: "GPT-4o"
      - name: "gpt-4o-mini"
        display_name: "GPT-4o Mini"

    anthropic:
      - name: "claude-opus-4-6"
        display_name: "Claude Opus 4.6"
      - name: "claude-sonnet-4-6"
        display_name: "Claude Sonnet 4.6"
        default: true
      - name: "claude-haiku-4-5-20251001"
        display_name: "Claude Haiku 4.5"

    gemini:
      - name: "gemini-3-flash-preview"
        display_name: "Gemini 3 Flash"
        default: true
      - name: "gemini-3-pro-preview"
        display_name: "Gemini 3 Pro"

    deepseek:
      - name: "deepseek-chat"
        display_name: "DeepSeek Chat"

# JSON Schema for Legal Position
schemas:
  legal_position:
    type: "json_schema"
    required_fields:
      - title
      - text
      - proceeding
      - category
    schema:
      type: "object"
      properties:
        title:
          type: "string"
          description: "Title of the legal position"
        text:
          type: "string"
          description: "Text of the legal position"
        proceeding:
          type: "string"
          description: "Type of court proceedings"
        category:
          type: "string"
          description: "Category of the legal position"
      required:
        - title
        - text
        - proceeding
        - category
      additionalProperties: false

# Required files for initialization
required_files:
  - "docstore_es_filter.json"
  - "bm25_retriever_short"
  - "bm25_retriever"

# Session Management Configuration
session:
  timeout_minutes: 30
  cleanup_interval_minutes: 5
  max_sessions: 1000
  storage_type: "memory"  # Options: memory, redis

# Redis Configuration (if using redis storage)
redis:
  host: "localhost"
  port: 6379
  db: 0
  password: null
  ssl: false

# Logging Configuration
logging:
  level: "INFO"
  format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
  file: "logs/app.log"
  max_bytes: 10485760  # 10MB
  backup_count: 5
  console: true

# Gradio Interface Configuration
gradio:
  server_name: "0.0.0.0"
  server_port: 7860
  share: true
  show_error: true
  ssr_mode: true
  # Theme configuration for Gradio 6
  theme:
    base: "Soft"
    primary_hue: "blue"
    secondary_hue: "indigo"
  # Custom CSS
  css: |
    .contain { display: flex; flex-direction: column; }
    .tab-content { padding: 16px; border-radius: 8px; background: white; }
    .header { margin-bottom: 24px; text-align: center; }
    .tab-header { font-size: 1.2em; margin-bottom: 16px; color: #2563eb; }