-
Notifications
You must be signed in to change notification settings - Fork 212
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): sql-expansion #667
Conversation
cyyeh
commented
Sep 13, 2024
•
edited
Loading
edited
- refactoring
- remove global variables
- restructuring pipelines
- fix test command in Justfile
- sql-expansion
a33ebdc
to
201abcf
Compare
@@ -16,7 +17,7 @@ | |||
|
|||
|
|||
@component | |||
class GenerationPostProcessor: | |||
class SQLBreakdownGenerationPostProcessor: |
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.
nitpick: its name seems a bit long, I think might be we can consider a shorten name for it. such as SQLBreakdownGenPostProcessor
, SQLBreakdownPostProcessor
, SQLBreakdownProcessor
, etc... wdyt?
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.
fixed, use SQLBreakdownGenPostProcessor
. I also changed SQLGenerationPostProcessor
to SQLGenPostProcessor
) | ||
self.sql_regeneration_post_processor = GenerationPostProcessor(engine=engine) | ||
self._components = { | ||
"sql_regeneration_preprocesser": SQLRegenerationRreprocesser(), |
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.
here seems a typo.
"sql_regeneration_preprocesser": SQLRegenerationRreprocesser(), | |
"sql_regeneration_preprocessor": SQLRegenerationPreprocessor(), |
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.
fixed
"sql_regeneration_prompt_builder": PromptBuilder( | ||
template=sql_regeneration_user_prompt_template | ||
), | ||
"sql_regeneration_generator": llm_provider.get_generator( | ||
system_prompt=sql_regeneration_system_prompt | ||
), | ||
"sql_regeneration_post_processor": SQLBreakdownGenerationPostProcessor( |
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.
I think we could consider removing the prefix sql_regeneration
to be more concise.
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.
fixed
self._score_filter = ScoreFilter() | ||
# todo: add a llm filter to filter out low scoring document | ||
self._output_formatter = OutputFormatter() | ||
_store = store_provider.get_store(dataset_name="view_questions") |
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.
nitpick: I do believe there is you just forgot removing the underscore. 🤣
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.
fixed
@@ -96,7 +96,7 @@ async def execute_sql( | |||
if response.status == 204: | |||
return True, None, None | |||
|
|||
res = await response.json() | |||
res = await response.text() |
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.
curiously, why did you change to use text method to get the response?
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.
reverted
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.
there has a minor comment for the test case. others LGTM. thanks for the hard work!