Skip to content

Commit

Permalink
changed the query parameters for the translation endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Gabteni committed May 14, 2024
1 parent e9a8c1a commit ee424d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/webservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ async def index():

@app.post("/translate", tags=["Endpoints"])
async def translate(
text: Union[str, None] = Query(default=None),
src_language: Union[str, None] = Query(default=None, enum=LANGUAGE_CODES)
text: str = Query(...),
src_language: str = Query(..., enum=LANGUAGE_CODES)
):
result = translate_to_german(text, src_language)
return StreamingResponse(
Expand Down

0 comments on commit ee424d8

Please sign in to comment.