-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(wren-ai-service): refactored API Endpoints into Independent Routers #747
Conversation
@paopa thanks for letting me work on the issue, |
Thanks for the hard work again! I will review it in these day! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work first!. overall it is good to me. I think having a few comments need to be done, then we can merge this PR. the router document you can refer to
WrenAI/wren-ai-service/src/web/v1/routers/semantics_description.py
Lines 24 to 70 in cf31416
1. POST /semantics-descriptions | |
- Generates a new semantic description | |
- Request body: PostRequest | |
{ | |
"selected_models": ["model1", "model2"], # List of model names to describe | |
"user_prompt": "Describe these models", # User's instruction for description | |
"mdl": "{ ... }" # JSON string of the MDL (Model Definition Language) | |
} | |
- Response: PostResponse | |
{ | |
"id": "unique-uuid" # Unique identifier for the generated description | |
} | |
2. GET /semantics-descriptions/{id} | |
- Retrieves the status and result of a semantic description generation | |
- Path parameter: id (str) | |
- Response: GetResponse | |
{ | |
"id": "unique-uuid", # Unique identifier of the description | |
"status": "generating" | "finished" | "failed", | |
"response": { # Present only if status is "finished" | |
"model1": { | |
"name": "model1", | |
"columns": [ | |
{ | |
"name": "col1", | |
"description": "Unique identifier for each record in the example model." | |
} | |
], | |
"description": "This model is used for analysis purposes, capturing key attributes of records." | |
}, | |
"model2": { | |
"name": "model2", | |
"columns": [ | |
{ | |
"name": "col1", | |
"description": "Unique identifier for each record in the example model." | |
} | |
], | |
"description": "This model is used for analysis purposes, capturing key attributes of records." | |
} | |
}, | |
"error": { # Present only if status is "failed" | |
"code": "OTHERS", | |
"message": "Error description" | |
} | |
} |
… refactor/endpoints
@paopa Thank you for the suggestions! If you can kindly review the changes now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! kudos to your hard work!
hey @Spirizeon, Thanks for the contribution again! You can DM @chilijung on Discord with #735 to get the swag form link. |
This PR fixes the issue of #735 (Work In Progress)