Spaces:
Running
Running
File size: 1,316 Bytes
98b9b80 0d24772 8fdbdd0 98b9b80 da01f22 0d24772 02e1af1 e79c259 da01f22 02e1af1 da01f22 0d24772 e79c259 42cb866 0d24772 42cb866 0d24772 42cb866 0d24772 02e1af1 98b9b80 da01f22 98b9b80 02e1af1 98b9b80 |
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 |
# config.py
import os
from dotenv import load_dotenv
from typing import Dict, Any
load_dotenv()
# AI Provider Configuration
GROQ_API_KEY = os.getenv("GROQ_API_KEY", "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")
# Model Settings
MODEL_SETTINGS = {
"model": "deepseek-r1-distill-llama-70b",
"max_tokens": 4000,
"temperature": 0.7,
"top_p": 1.0,
"api_base": "https://api.groq.com/openai/v1"
}
# Language Settings
DEFAULT_LANGUAGE = 'ar' # Arabic by default
SUPPORTED_LANGUAGES = ['ar', 'en']
# UAE Legal Resources
UAE_LEGAL_DOMAINS = [
'https://elaws.moj.gov.ae',
'https://www.mohre.gov.ae',
'https://www.dm.gov.ae',
'https://www.adjd.gov.ae',
'https://www.dc.gov.ae'
]
# Legal Categories
LEGAL_CATEGORIES = {
'civil': 'ุงููุงููู ุงูู
ุฏูู',
'criminal': 'ุงููุงููู ุงูุฌูุงุฆู',
'commercial': 'ุงููุงููู ุงูุชุฌุงุฑู',
'labor': 'ูุงููู ุงูุนู
ู',
'family': 'ูุงููู ุงูุฃุณุฑุฉ',
'property': 'ูุงููู ุงูุนูุงุฑุงุช'
}
def get_ai_config() -> Dict[str, Any]:
"""Get AI configuration"""
config = {
"api_key": GROQ_API_KEY,
"api_base": MODEL_SETTINGS["api_base"],
"language": "ar", # Set language to Arabic
}
config.update(MODEL_SETTINGS)
return config |