cotcotquedec commited on
Commit
1ce4699
·
1 Parent(s): 0e6018e

refactor(main): replace '/ping' endpoint with root endpoint

Browse files

The '/ping' endpoint has been replaced with a root endpoint that returns a simple JSON response. This change enhances the API by providing a more intuitive root endpoint for basic connectivity checks.

The new root endpoint returns a JSON object with a greeting message, simplifying the API structure and improving user experience.

Files changed (1) hide show
  1. main.py +3 -5
main.py CHANGED
@@ -30,11 +30,9 @@ class ChatCompletionRequest(BaseModel):
30
  stream: bool = False
31
  max_tokens: Optional[int] = 1024
32
 
33
-
34
-
35
- @app.get("/ping")
36
- def pong():
37
- return "Pong"
38
 
39
  @app.get("/models")
40
  async def get_models():
 
30
  stream: bool = False
31
  max_tokens: Optional[int] = 1024
32
 
33
+ @app.get("/")
34
+ def read_root():
35
+ return {"Hello": "World!"}
 
 
36
 
37
  @app.get("/models")
38
  async def get_models():