Skip to content

Conversation

@cyyeh
Copy link
Member

@cyyeh cyyeh commented Aug 30, 2024

  • add a sql to answer pipeline that aims to answer user's question based on data retrieved by sql

@cyyeh cyyeh added module/ai-service ai-service related ci/ai-service ai-service related labels Aug 30, 2024
@cyyeh cyyeh requested a review from paopa August 30, 2024 05:50
@cyyeh cyyeh force-pushed the feat/ai-service/sql-to-answer-v2 branch 7 times, most recently from 9c4c077 to 8907a65 Compare September 6, 2024 02:40
@cyyeh cyyeh force-pushed the feat/ai-service/sql-to-answer-v2 branch 3 times, most recently from ffad664 to 57dec72 Compare September 11, 2024 07:25
) as response:
res = await response.json()
if res.get("data"):
return True, None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about keep the error and return one more value for data? I think using the same position to represent two meaning might be not a good choice.

e.g.

return status, data, error

pipelines: dict[str, BasicPipeline],
):
self._pipelines = pipelines
self._sql_answer_results = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be instead by the TTL cache. you could refer to the function in ask service.

@cyyeh cyyeh force-pushed the feat/ai-service/sql-to-answer-v2 branch from 57dec72 to 7e41852 Compare September 11, 2024 11:47
Copy link
Contributor

@paopa paopa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@paopa paopa merged commit a822d5c into main Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/ai-service ai-service related module/ai-service ai-service related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants