C2MV commited on
Commit
1a63cc9
verified
1 Parent(s): c582a83

Create config.py

Browse files
Files changed (1) hide show
  1. config.py +36 -0
config.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # config.py
2
+
3
+ import os
4
+ from pydantic import BaseModel, ConfigDict
5
+
6
+ # Clase de configuraci贸n usando pydantic
7
+ class MyModel(BaseModel):
8
+ model_config = ConfigDict(arbitrary_types_allowed=True)
9
+
10
+ # Configuraci贸n de la API de Pinecone
11
+ PINECONE_API_KEY = os.getenv("PINECONE_API_KEY")
12
+ PINECONE_ENVIRONMENT = os.getenv("PINECONE_ENVIRONMENT")
13
+
14
+ # Configuraciones del modelo
15
+ EMBEDDING_MODEL_NAME = "BAAI/bge-m3"
16
+ EMBED_MODEL = 'BGE_M3-1024'
17
+ DIMENSIONS = 1024
18
+
19
+ # Nombre del 铆ndice de Pinecone
20
+ INDEX_NAME = 'neonatos2'
21
+
22
+ # Campos de contexto y enlace
23
+ CONTEXT_FIELDS = ['Tag', 'Pregunta', 'Respuesta']
24
+ LINK_FIELDS = ['Tag', 'Respuesta']
25
+
26
+ # Umbral de similitud por defecto
27
+ SIMILARITY_THRESHOLD_DEFAULT = 0.5
28
+
29
+ # Prompt del sistema para Yi-Coder
30
+ SYSTEM_PROMPT = """
31
+ Eres un asistente en salud neonatal en Per煤, responde y saluda de forma adecuada,
32
+ solo responde en forma de texto de usuario no del chat completo.
33
+ """
34
+
35
+ # Longitud m谩xima por defecto para las respuestas generadas
36
+ MAX_LENGTH_DEFAULT = 100