-
Notifications
You must be signed in to change notification settings - Fork 222
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
chore(wren-ai-service): Refactor Services to use Resource Classes #848
base: main
Are you sure you want to change the base?
Conversation
Thank @Killer2OP for your hard work! I'll review this PR later today. It appears there are a few conflicts with the latest changes. Could you please resolve them? |
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.
Thank you for your contribution! I appreciate the effort you've put into this PR. I have a few remaining comments, and it appears that some tasks are still incomplete. Could you please replace the old classes (such as AskRequest
, AskResponse
, etc.) in the routers by the input and resource class?
class Configurations(BaseModel): | ||
fiscal_year: Optional[FiscalYear] = None | ||
language: str = "English" |
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.
after solving the conflict for the latest commits, i think we could use Configuration class in web/v1/services module stead of it
Dict[ | ||
"summary": str, | ||
"sql": str, | ||
"cte_name": str, | ||
"corrections": List[ | ||
Dict[ | ||
"before": Dict[ | ||
"type": Literal["filter", "selectItems", "relation", "groupByKeys", "sortings"], | ||
"value": str | ||
], | ||
"after": Dict[ | ||
"type": Literal["sql_expression", "nl_expression"], | ||
"value": str | ||
] | ||
] | ||
] | ||
] | ||
] |
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.
this type declaration seems be wrong, could you help to fix? thanks!
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.
Dict[ | |
"summary": str, | |
"sql": str, | |
"cte_name": str, | |
"corrections": List[ | |
Dict[ | |
"before": Dict[ | |
"type": Literal["filter", "selectItems", "relation", "groupByKeys", "sortings"], | |
"value": str | |
], | |
"after": Dict[ | |
"type": Literal["sql_expression", "nl_expression"], | |
"value": str | |
] | |
] | |
] | |
] | |
] | |
Dict[ | |
"summary": str, | |
"sql": str, | |
"cte_name": str, | |
"corrections": list[dict] | |
] | |
] | |
] |
Dict[ | ||
"step_sql": str, | ||
"step_summary": str, | ||
"step_sql_analysis_results": List[Dict] | ||
] |
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.
gently ping to mention here has the same issue as the previous comment.
configurations: Dict[ | ||
"language": str | ||
] = {"language": "English"} |
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.
gently ping to mention here has the same issue as the previous comment.
Sure, I will fix them. |
hey @Killer2OP, hope everything is going smoothly. How's the progress on this PR? Let me know if you need any help. 😄 |
Ya sure 😊 , I was busy due to the exam I will start working on it from today. |
Description
Refactored all the Services to use Resource Class
Fixes #736