Moibe commited on
Commit
8de2363
·
1 Parent(s): b939eab

Server Check

Browse files
Files changed (1) hide show
  1. herramientas.py +10 -12
herramientas.py CHANGED
@@ -5,27 +5,25 @@ import time
5
 
6
  def obtenClienteOpenAI():
7
  if local_check():
8
- print("Estoy en LOCAL...")
9
- time.sleep(18)
10
- # import bridges
11
- # buzz = bridges.buzz
12
- # llave = bridges.llave
13
  else:
14
  print("Estoy en REMOTO...")
15
- time.sleep(18)
16
- # buzz = os.getenv("buzz")
17
- # llave = os.getenv("llave")
18
 
19
- # client = OpenAI(api_key=buzz)
20
- # return client
21
 
22
  def local_check():
23
 
24
  hostname = socket.gethostname()
 
25
  print("Dentro de local_check... , el hostname es: ", hostname)
26
- time.sleep(18)
27
 
28
- if hostname == 'nombre_del_servidor':
29
  print("Ejecutando en el servidor")
30
  return False
31
  else:
 
5
 
6
  def obtenClienteOpenAI():
7
  if local_check():
8
+ print("Estoy en LOCAL...")
9
+ import bridges
10
+ buzz = bridges.buzz
11
+ llave = bridges.llave
 
12
  else:
13
  print("Estoy en REMOTO...")
14
+ buzz = os.getenv("buzz")
15
+ llave = os.getenv("llave")
 
16
 
17
+ client = OpenAI(api_key=buzz)
18
+ return client
19
 
20
  def local_check():
21
 
22
  hostname = socket.gethostname()
23
+ #r-moibe-nowme
24
  print("Dentro de local_check... , el hostname es: ", hostname)
 
25
 
26
+ if hostname == 'r-moibe-nowme-9odaken2-89247-qbpii':
27
  print("Ejecutando en el servidor")
28
  return False
29
  else: