see ip to differenciate my space from duplicates
Browse files- TextGen/router.py +3 -1
TextGen/router.py
CHANGED
@@ -167,7 +167,9 @@ def inference_model(system_messsage, prompt):
|
|
167 |
return Generate(text=llm_response.content)
|
168 |
|
169 |
@app.get("/", tags=["Home"])
|
170 |
-
def api_home():
|
|
|
|
|
171 |
return {'detail': 'Everchanging Quest backend, nothing to see here'}
|
172 |
|
173 |
@app.post("/api/generate", summary="Generate text from prompt", tags=["Generate"], response_model=Generate)
|
|
|
167 |
return Generate(text=llm_response.content)
|
168 |
|
169 |
@app.get("/", tags=["Home"])
|
170 |
+
def api_home(request: Request):
|
171 |
+
client_ip = request.client.host
|
172 |
+
print(client_ip)
|
173 |
return {'detail': 'Everchanging Quest backend, nothing to see here'}
|
174 |
|
175 |
@app.post("/api/generate", summary="Generate text from prompt", tags=["Generate"], response_model=Generate)
|