sonygod commited on
Commit
5ddfd85
·
1 Parent(s): 549dfca
Files changed (1) hide show
  1. app.py +1 -18
app.py CHANGED
@@ -3,7 +3,6 @@ from flask import Flask, request, Response, json
3
  import requests
4
  from uuid import uuid4
5
  import time
6
- import socket
7
  app = Flask(__name__)
8
 
9
  MODEL_MAPPING = {
@@ -142,24 +141,8 @@ async def health_check():
142
  "version": "1.0"
143
  }
144
 
145
- @app.get("/ip")
146
- async def get_ip():
147
- # Get internal IP
148
- hostname = socket.gethostname()
149
- internal_ip = socket.gethostbyname(hostname)
150
-
151
- # Get external IP
152
- try:
153
- external_ip = requests.get('https://api.ipify.org').text
154
- except:
155
- external_ip = "Unable to fetch external IP"
156
 
157
- return {
158
- "hostname": hostname,
159
- "internal_ip": internal_ip,
160
- "external_ip": external_ip,
161
- "timestamp": datetime.datetime.now().isoformat()
162
- }
163
 
164
  @app.route("/v1/chat/completions", methods=["POST"])
165
  def chat_completions():
 
3
  import requests
4
  from uuid import uuid4
5
  import time
 
6
  app = Flask(__name__)
7
 
8
  MODEL_MAPPING = {
 
141
  "version": "1.0"
142
  }
143
 
144
+
 
 
 
 
 
 
 
 
 
 
145
 
 
 
 
 
 
 
146
 
147
  @app.route("/v1/chat/completions", methods=["POST"])
148
  def chat_completions():