django-lucy-assist 1.1.1__py3-none-any.whl → 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_lucy_assist-1.1.1.dist-info → django_lucy_assist-1.2.0.dist-info}/METADATA +39 -26
- {django_lucy_assist-1.1.1.dist-info → django_lucy_assist-1.2.0.dist-info}/RECORD +13 -13
- lucy_assist/__init__.py +2 -2
- lucy_assist/conf.py +18 -18
- lucy_assist/constantes.py +1 -1
- lucy_assist/context_processors.py +2 -2
- lucy_assist/services/__init__.py +3 -2
- lucy_assist/services/mistral_service.py +489 -0
- lucy_assist/services/tool_executor_service.py +10 -10
- lucy_assist/services/tools_definition.py +238 -208
- lucy_assist/views/api_views.py +7 -7
- lucy_assist/services/claude_service.py +0 -423
- {django_lucy_assist-1.1.1.dist-info → django_lucy_assist-1.2.0.dist-info}/WHEEL +0 -0
- {django_lucy_assist-1.1.1.dist-info → django_lucy_assist-1.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-lucy-assist
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
4
4
|
Summary: Assistant IA intelligent Revolucy pour outil métier
|
|
5
5
|
Author-email: Revolucy <hello@revolucy.fr>
|
|
6
6
|
Maintainer-email: Maxence <hello@revolucy.fr>
|
|
@@ -9,7 +9,7 @@ Project-URL: Homepage, https://github.com/revolucy/django-lucy-assist
|
|
|
9
9
|
Project-URL: Documentation, https://github.com/revolucy/django-lucy-assist#readme
|
|
10
10
|
Project-URL: Repository, https://github.com/revolucy/django-lucy-assist.git
|
|
11
11
|
Project-URL: Issues, https://github.com/revolucy/django-lucy-assist/issues
|
|
12
|
-
Keywords: django,chatbot,ai,
|
|
12
|
+
Keywords: django,chatbot,ai,mistral,assistant,crm
|
|
13
13
|
Classifier: Development Status :: 4 - Beta
|
|
14
14
|
Classifier: Environment :: Web Environment
|
|
15
15
|
Classifier: Framework :: Django
|
|
@@ -30,7 +30,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
30
30
|
Requires-Python: >=3.9
|
|
31
31
|
Description-Content-Type: text/markdown
|
|
32
32
|
Requires-Dist: Django>=4.0
|
|
33
|
-
Requires-Dist:
|
|
33
|
+
Requires-Dist: mistralai>=1.0.0
|
|
34
34
|
Requires-Dist: requests>=2.28.0
|
|
35
35
|
Provides-Extra: dev
|
|
36
36
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
@@ -44,7 +44,7 @@ Requires-Dist: python-gitlab>=3.15.0; extra == "gitlab"
|
|
|
44
44
|
|
|
45
45
|
# Django Lucy Assist
|
|
46
46
|
|
|
47
|
-
Assistant IA intelligent
|
|
47
|
+
Assistant IA intelligent base sur Mistral AI, integrable dans n'importe quelle application Django.
|
|
48
48
|
|
|
49
49
|
## Installation
|
|
50
50
|
|
|
@@ -54,7 +54,7 @@ pip install django-lucy-assist
|
|
|
54
54
|
|
|
55
55
|
## Configuration
|
|
56
56
|
|
|
57
|
-
### 1. Ajouter l'application
|
|
57
|
+
### 1. Ajouter l'application a INSTALLED_APPS
|
|
58
58
|
|
|
59
59
|
```python
|
|
60
60
|
INSTALLED_APPS = [
|
|
@@ -69,11 +69,11 @@ Ajouter dans votre fichier `.env` :
|
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
71
|
# ======================================== LUCY ASSIST ========================================
|
|
72
|
-
|
|
72
|
+
MISTRAL_LUCY_API_KEY=votre-cle-api-mistral
|
|
73
73
|
GITLAB_TOKEN=glpat-...
|
|
74
74
|
GITLAB_PROJECT_ID=123
|
|
75
75
|
|
|
76
|
-
# SIREN client pour l'API Lucy CRM (Si non
|
|
76
|
+
# SIREN client pour l'API Lucy CRM (Si non present via le module de retour)
|
|
77
77
|
SIREN_CLIENT=123456789
|
|
78
78
|
```
|
|
79
79
|
|
|
@@ -84,11 +84,14 @@ import os
|
|
|
84
84
|
|
|
85
85
|
#############################################################################################################
|
|
86
86
|
# Lucy Assist
|
|
87
|
-
|
|
87
|
+
MISTRAL_LUCY_API_KEY = env('MISTRAL_LUCY_API_KEY', default=None)
|
|
88
88
|
GITLAB_URL = env('GITLAB_URL', default=None)
|
|
89
89
|
GITLAB_TOKEN = env('GITLAB_TOKEN', default=None)
|
|
90
90
|
GITLAB_PROJECT_ID = env('GITLAB_PROJECT_ID', default=None)
|
|
91
|
-
LUCY_ASSIST = {
|
|
91
|
+
LUCY_ASSIST = {
|
|
92
|
+
'PROJECT_APPS_PREFIX': 'apps.',
|
|
93
|
+
# 'MISTRAL_MODEL': 'mistral-large-latest', # Modele par defaut (le plus performant)
|
|
94
|
+
}
|
|
92
95
|
```
|
|
93
96
|
|
|
94
97
|
### 3. Ajouter les URLs
|
|
@@ -127,7 +130,7 @@ TEMPLATES = [
|
|
|
127
130
|
{% include 'lucy_assist/chatbot_sidebar.html' %}
|
|
128
131
|
```
|
|
129
132
|
|
|
130
|
-
### 6.
|
|
133
|
+
### 6. Executer les migrations
|
|
131
134
|
|
|
132
135
|
```bash
|
|
133
136
|
python manage.py migrate lucy_assist
|
|
@@ -135,21 +138,21 @@ python manage.py migrate lucy_assist
|
|
|
135
138
|
|
|
136
139
|
## Utilisation
|
|
137
140
|
|
|
138
|
-
Une fois
|
|
141
|
+
Une fois installe et configure, Lucy Assist apparaitra automatiquement sur toutes les pages de votre application avec un bouton flottant en bas a droite.
|
|
139
142
|
|
|
140
|
-
###
|
|
143
|
+
### Fonctionnalites
|
|
141
144
|
|
|
142
145
|
- **Chat IA contextuel** : Lucy comprend le contexte de la page actuelle
|
|
143
|
-
- **Actions CRUD** : Lucy peut
|
|
144
|
-
- **Analyse de bugs** : Connexion
|
|
146
|
+
- **Actions CRUD** : Lucy peut creer, modifier, rechercher et supprimer des objets
|
|
147
|
+
- **Analyse de bugs** : Connexion a GitLab pour analyser les problemes signales
|
|
145
148
|
- **Historique des conversations** : Sauvegarde automatique des conversations
|
|
146
|
-
- **Gestion des tokens** : Suivi de la consommation des tokens
|
|
149
|
+
- **Gestion des tokens** : Suivi de la consommation des tokens Mistral
|
|
147
150
|
|
|
148
|
-
## Configuration
|
|
151
|
+
## Configuration avancee
|
|
149
152
|
|
|
150
|
-
###
|
|
153
|
+
### Modele de base personnalise
|
|
151
154
|
|
|
152
|
-
Si vous utilisez un
|
|
155
|
+
Si vous utilisez un modele de base personnalise avec des champs d'audit (created_date, updated_date, etc.), vous pouvez le configurer :
|
|
153
156
|
|
|
154
157
|
```python
|
|
155
158
|
LUCY_ASSIST = {
|
|
@@ -157,14 +160,24 @@ LUCY_ASSIST = {
|
|
|
157
160
|
}
|
|
158
161
|
```
|
|
159
162
|
|
|
160
|
-
###
|
|
163
|
+
### Modele Mistral
|
|
164
|
+
|
|
165
|
+
Par defaut, Lucy Assist utilise `mistral-large-latest` (le modele le plus performant). Vous pouvez changer le modele :
|
|
166
|
+
|
|
167
|
+
```python
|
|
168
|
+
LUCY_ASSIST = {
|
|
169
|
+
'MISTRAL_MODEL': 'mistral-large-latest', # Ou 'mistral-medium', 'mistral-small', etc.
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Personnalisation des questions frequentes
|
|
161
174
|
|
|
162
175
|
```python
|
|
163
176
|
LUCY_ASSIST = {
|
|
164
177
|
'QUESTIONS_FREQUENTES_DEFAULT': [
|
|
165
|
-
"Comment
|
|
178
|
+
"Comment creer un nouveau membre ?",
|
|
166
179
|
"Comment effectuer un paiement ?",
|
|
167
|
-
"Comment exporter des
|
|
180
|
+
"Comment exporter des donnees ?",
|
|
168
181
|
],
|
|
169
182
|
}
|
|
170
183
|
```
|
|
@@ -174,19 +187,19 @@ LUCY_ASSIST = {
|
|
|
174
187
|
Lucy Assist expose plusieurs endpoints API :
|
|
175
188
|
|
|
176
189
|
- `GET /lucy-assist/api/conversations/` - Liste des conversations
|
|
177
|
-
- `POST /lucy-assist/api/conversations/` -
|
|
178
|
-
- `GET /lucy-assist/api/conversations/<id>/` -
|
|
190
|
+
- `POST /lucy-assist/api/conversations/` - Creer une conversation
|
|
191
|
+
- `GET /lucy-assist/api/conversations/<id>/` - Detail d'une conversation
|
|
179
192
|
- `POST /lucy-assist/api/conversations/<id>/messages/` - Ajouter un message
|
|
180
|
-
- `POST /lucy-assist/api/
|
|
193
|
+
- `POST /lucy-assist/api/conversations/<id>/completion/` - Generer une reponse (streaming)
|
|
181
194
|
- `GET /lucy-assist/api/tokens/status/` - Statut des tokens
|
|
182
195
|
|
|
183
196
|
## Licence
|
|
184
197
|
|
|
185
198
|
[Revolucy](https://www.revolucy.fr)
|
|
186
199
|
|
|
187
|
-
##
|
|
200
|
+
## Deploiement Pypi
|
|
188
201
|
|
|
189
202
|
1. `docker-compose exec django pip install build twine`
|
|
190
203
|
2. `python -m build`
|
|
191
204
|
3. `python -m twine upload dist/*`
|
|
192
|
-
4. Indiquer le token
|
|
205
|
+
4. Indiquer le token present dans 1Password
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
lucy_assist/__init__.py,sha256=
|
|
1
|
+
lucy_assist/__init__.py,sha256=klW0laX0ly7M6Uvq0FsrMZXn1znyOe2ige3H2CD_LaI,325
|
|
2
2
|
lucy_assist/admin.py,sha256=DHdcvkCYNkVBZoWrZ58AQxOEN2EmsN4E09qRnqYyARI,2919
|
|
3
3
|
lucy_assist/apps.py,sha256=zHZtlBXs5ML4CKtGg7xDyptSWzLfB1ks2VvbXF50hdo,264
|
|
4
|
-
lucy_assist/conf.py,sha256=
|
|
5
|
-
lucy_assist/constantes.py,sha256=
|
|
6
|
-
lucy_assist/context_processors.py,sha256=
|
|
4
|
+
lucy_assist/conf.py,sha256=filh-SAWuFt69hu0MmpvX6VUhe7BvZqDTlqQ2riRmKY,3846
|
|
5
|
+
lucy_assist/constantes.py,sha256=izuIYppBa9mhLE4lzaNBj6erWuto0ZzB7_Iwn3fmA28,5005
|
|
6
|
+
lucy_assist/context_processors.py,sha256=tnzil4CEJwtExuQGLyRzIEuwpQfnwJ-eMgkkR6zNgSg,2200
|
|
7
7
|
lucy_assist/signals.py,sha256=aQA84oe9JNL72eeV5kURTTV-9CcQpqakDle1Lv3dnFY,861
|
|
8
8
|
lucy_assist/urls.py,sha256=Qr8jJjEyC_EFGAeiZnjhgTc-9P4Y-TqKDaYicWRp_GQ,1451
|
|
9
9
|
lucy_assist/migrations/0001_initial.py,sha256=quQUw6is5clu3Q4B3P_0mUZVE33lSvdimH_OTCY3ycE,4977
|
|
@@ -16,15 +16,15 @@ lucy_assist/models/configuration.py,sha256=9MjEI2gG2lx1H2UyHo9zCnDOoUC_1hVOKOYwz
|
|
|
16
16
|
lucy_assist/models/conversation.py,sha256=psx2AQtQ5SFP-AJD7wbGabpXXLIGYngdVZfeoTlgKtQ,1849
|
|
17
17
|
lucy_assist/models/message.py,sha256=kf-ffMtLYNFhXYUrB3QSL97KKDJUOMrKaPjKeOcJa_o,1492
|
|
18
18
|
lucy_assist/models/project_context_cache.py,sha256=Bnb0VU7pv7QEvjOI6JSLEPvL4BxskCQ0ojWGxO7YDSM,6530
|
|
19
|
-
lucy_assist/services/__init__.py,sha256=
|
|
19
|
+
lucy_assist/services/__init__.py,sha256=2Txqcn_M33amvlI1KZLJk9RXvu0s0I2-GfYKX_RAe3w,807
|
|
20
20
|
lucy_assist/services/bug_notification_service.py,sha256=OyowCvAs-QDlsGQ_WTFoc4lRe9detD7r6ZyYK0JD2Sc,7217
|
|
21
|
-
lucy_assist/services/claude_service.py,sha256=vYeotZKwFghbWNmN_VM0uggnFQgtNNK0SP3e9QPQzgc,16218
|
|
22
21
|
lucy_assist/services/context_service.py,sha256=Vx2tR6W1jmqr06pGn924uzWTF2SV7RAO_JIScxYbCy0,17087
|
|
23
22
|
lucy_assist/services/crud_service.py,sha256=W50K02ZkaScyzO-yRaBd9Cjva9PGH7OjNTipSruErcA,41495
|
|
24
23
|
lucy_assist/services/gitlab_service.py,sha256=uH83fwRSCwiRItznENpYQG4aPckjafYIV9z6OChUrZg,8056
|
|
24
|
+
lucy_assist/services/mistral_service.py,sha256=NZTEQacsoNgDVXkgmyRcxENaq6toNcDtRu_dKE4PDY0,18578
|
|
25
25
|
lucy_assist/services/project_context_service.py,sha256=bIuqTanc59gP_BLod3oQgWplxpiCgByg-kbUMe_57CQ,14053
|
|
26
|
-
lucy_assist/services/tool_executor_service.py,sha256=
|
|
27
|
-
lucy_assist/services/tools_definition.py,sha256=
|
|
26
|
+
lucy_assist/services/tool_executor_service.py,sha256=nTeJbj2JUDMk_bmLVgGxtWqFbSgywq-tNRBK-_3Yayw,15155
|
|
27
|
+
lucy_assist/services/tools_definition.py,sha256=qIiIoB5_QMqmkD03OOEk_3A5Nc0g0avAjDCj3Uq3_r8,11735
|
|
28
28
|
lucy_assist/services/view_discovery_service.py,sha256=J9LkHXUOzlGS3cyft2_jA1X27TWOd3xViN4M7GOROVw,11872
|
|
29
29
|
lucy_assist/static/lucy_assist/css/lucy-assist.css,sha256=7bJfV31cIgOFJQ8RQ0vIqgel6dM8dh5W2wshv6MHjxs,23325
|
|
30
30
|
lucy_assist/static/lucy_assist/image/icon-lucy.png,sha256=FOYlwXAt40Gr9jsWFmhgPivYOBFWKeYW0lxJI5Up-GM,6710
|
|
@@ -40,8 +40,8 @@ lucy_assist/utils/log_utils.py,sha256=gdjaKg5PNUYlDVCQNFXQJG3vsLKay_aWX6AJxoHtiG
|
|
|
40
40
|
lucy_assist/utils/message_utils.py,sha256=YzcLHnl1ig4d5_utHCJwgxS7tKmd49Q-tuo78e6w2Ww,4494
|
|
41
41
|
lucy_assist/utils/token_utils.py,sha256=aBzyKVqpU67rAetO_Ee3QIfPtbNyjyWSe6qPfzIRJF8,2608
|
|
42
42
|
lucy_assist/views/__init__.py,sha256=uUPYpuHlBC8j7zKS_DDoWjwpCpRnOIXETY-S2-Ss0cY,288
|
|
43
|
-
lucy_assist/views/api_views.py,sha256=
|
|
44
|
-
django_lucy_assist-1.
|
|
45
|
-
django_lucy_assist-1.
|
|
46
|
-
django_lucy_assist-1.
|
|
47
|
-
django_lucy_assist-1.
|
|
43
|
+
lucy_assist/views/api_views.py,sha256=sJwKNC9-mi1zMbgyKZTVvT3pz4hMmw4jR0rrS7iJR-g,23619
|
|
44
|
+
django_lucy_assist-1.2.0.dist-info/METADATA,sha256=XGoB6psj3RT8EkuP7Ip8ZKmjHwcBDG6s7zTY8ZNB1Gk,5899
|
|
45
|
+
django_lucy_assist-1.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
46
|
+
django_lucy_assist-1.2.0.dist-info/top_level.txt,sha256=T-UCiwpn5yF3Oem3234TUpSVnEgbkrM2rGz9Tz5N-QA,12
|
|
47
|
+
django_lucy_assist-1.2.0.dist-info/RECORD,,
|
lucy_assist/__init__.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Lucy Assist - Assistant IA intelligent pour applications Django.
|
|
3
3
|
|
|
4
|
-
Un chatbot IA
|
|
4
|
+
Un chatbot IA base sur Mistral AI, integrable dans n'importe quelle
|
|
5
5
|
application Django pour fournir une assistance contextuelle aux utilisateurs.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = '1.
|
|
8
|
+
__version__ = '1.2.0'
|
|
9
9
|
__author__ = 'Revolucy'
|
|
10
10
|
|
|
11
11
|
default_app_config = 'lucy_assist.apps.LucyAssistConfig'
|
lucy_assist/conf.py
CHANGED
|
@@ -11,17 +11,17 @@ class LucyAssistSettings:
|
|
|
11
11
|
Lit les settings depuis LUCY_ASSIST dans settings.py.
|
|
12
12
|
"""
|
|
13
13
|
|
|
14
|
-
# Valeurs par
|
|
14
|
+
# Valeurs par defaut
|
|
15
15
|
DEFAULTS = {
|
|
16
|
-
#
|
|
17
|
-
# Peut
|
|
16
|
+
# Modele de base pour les modeles Lucy Assist (None = utilise le modele par defaut)
|
|
17
|
+
# Peut etre une string "mon_app.models.MonModele" ou une classe directement
|
|
18
18
|
'BASE_MODEL': None,
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
'
|
|
20
|
+
# Cle API Mistral (peut aussi etre definie via MISTRAL_LUCY_API_KEY)
|
|
21
|
+
'MISTRAL_LUCY_API_KEY': None,
|
|
22
22
|
|
|
23
|
-
#
|
|
24
|
-
'
|
|
23
|
+
# Modele Mistral a utiliser (mistral-large-latest = le plus performant)
|
|
24
|
+
'MISTRAL_MODEL': 'mistral-large-latest',
|
|
25
25
|
|
|
26
26
|
# Configuration GitLab pour l'analyse de bugs
|
|
27
27
|
'GITLAB_URL': None,
|
|
@@ -34,8 +34,8 @@ class LucyAssistSettings:
|
|
|
34
34
|
# Email de fallback pour les feedbacks
|
|
35
35
|
'FEEDBACK_EMAIL': 'support@revolucy.fr',
|
|
36
36
|
|
|
37
|
-
#
|
|
38
|
-
# Ex: 'apps.' pour filtrer les apps
|
|
37
|
+
# Prefixe des apps du projet pour le mapping modele -> app
|
|
38
|
+
# Ex: 'apps.' pour filtrer les apps commencant par 'apps.'
|
|
39
39
|
'PROJECT_APPS_PREFIX': None,
|
|
40
40
|
|
|
41
41
|
# URL de base de l'API Lucy CRM
|
|
@@ -47,20 +47,20 @@ class LucyAssistSettings:
|
|
|
47
47
|
# Nombre moyen de tokens par conversation
|
|
48
48
|
'TOKENS_MOYENS_PAR_CONVERSATION': 2000,
|
|
49
49
|
|
|
50
|
-
# Questions
|
|
50
|
+
# Questions frequentes par defaut (generiques)
|
|
51
51
|
'QUESTIONS_FREQUENTES_DEFAULT': [
|
|
52
|
-
"Comment
|
|
52
|
+
"Comment creer un nouveau client ?",
|
|
53
53
|
"Comment effectuer une recherche ?",
|
|
54
|
-
"Comment exporter des
|
|
54
|
+
"Comment exporter des donnees ?",
|
|
55
55
|
"Comment modifier mon profil ?",
|
|
56
|
-
"
|
|
56
|
+
"Ou trouver la liste des reservations ?",
|
|
57
57
|
],
|
|
58
58
|
|
|
59
59
|
# Chemin vers le module contenant set_current_user pour le ThreadLocal
|
|
60
60
|
# Ex: 'alyse.middleware.middleware' pour le projet Alyse
|
|
61
61
|
'THREAD_LOCAL_MODULE': None,
|
|
62
62
|
|
|
63
|
-
# Attributs de l'utilisateur
|
|
63
|
+
# Attributs de l'utilisateur a copier vers la requete
|
|
64
64
|
# Ex: ['franchise', 'tenant', 'organization']
|
|
65
65
|
'REQUEST_USER_ATTRS': [],
|
|
66
66
|
}
|
|
@@ -70,15 +70,15 @@ class LucyAssistSettings:
|
|
|
70
70
|
|
|
71
71
|
def __getattr__(self, name):
|
|
72
72
|
if name in self.DEFAULTS:
|
|
73
|
-
#
|
|
73
|
+
# Verifier d'abord dans LUCY_ASSIST settings
|
|
74
74
|
if name in self._settings:
|
|
75
75
|
return self._settings[name]
|
|
76
76
|
|
|
77
|
-
# Cas
|
|
78
|
-
if name == '
|
|
77
|
+
# Cas speciaux pour les settings qui peuvent etre definis au niveau global
|
|
78
|
+
if name == 'MISTRAL_LUCY_API_KEY':
|
|
79
79
|
# Chercher dans plusieurs variables possibles
|
|
80
80
|
return (
|
|
81
|
-
getattr(settings, '
|
|
81
|
+
getattr(settings, 'MISTRAL_LUCY_API_KEY', None) or
|
|
82
82
|
self.DEFAULTS[name]
|
|
83
83
|
)
|
|
84
84
|
|
lucy_assist/constantes.py
CHANGED
|
@@ -51,7 +51,7 @@ class LucyAssistConstantes:
|
|
|
51
51
|
(ARCHIVEE, 'Archivée'),
|
|
52
52
|
]
|
|
53
53
|
|
|
54
|
-
# Prompts
|
|
54
|
+
# Prompts systeme pour Mistral
|
|
55
55
|
SYSTEM_PROMPTS = {
|
|
56
56
|
'default': """Tu es Lucy, un assistant IA intégré dans un CRM métier (UNAF-CRM).
|
|
57
57
|
Tu as la capacité d'EXÉCUTER des actions directement dans l'application grâce aux tools disponibles.
|
|
@@ -37,8 +37,8 @@ def lucy_assist_context(request):
|
|
|
37
37
|
# Récupérer la configuration
|
|
38
38
|
config = ConfigurationLucyAssist.get_config()
|
|
39
39
|
|
|
40
|
-
#
|
|
41
|
-
api_key_configured = bool(getattr(settings, '
|
|
40
|
+
# Verifier si Lucy Assist est configure (cle API presente)
|
|
41
|
+
api_key_configured = bool(getattr(settings, 'MISTRAL_LUCY_API_KEY', ''))
|
|
42
42
|
|
|
43
43
|
if config and config.actif:
|
|
44
44
|
context['lucy_assist_enabled'] = True
|
lucy_assist/services/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from .
|
|
1
|
+
from .mistral_service import MistralService, ClaudeService # ClaudeService est un alias pour compatibilite
|
|
2
2
|
from .gitlab_service import GitLabService
|
|
3
3
|
from .context_service import ContextService
|
|
4
4
|
from .crud_service import CRUDService
|
|
@@ -8,7 +8,8 @@ from .tools_definition import LUCY_ASSIST_TOOLS, get_app_for_model
|
|
|
8
8
|
from .bug_notification_service import BugNotificationService
|
|
9
9
|
|
|
10
10
|
__all__ = [
|
|
11
|
-
'
|
|
11
|
+
'MistralService',
|
|
12
|
+
'ClaudeService', # Alias pour compatibilite
|
|
12
13
|
'GitLabService',
|
|
13
14
|
'ContextService',
|
|
14
15
|
'CRUDService',
|