Skip to content

Conversation

@cyyeh
Copy link
Member

@cyyeh cyyeh commented Oct 21, 2024

  • allow generating candidates in generating phase
  • stablize generating multilingual output
  • fix time issue

@cyyeh cyyeh added module/ai-service ai-service related ci/ai-service ai-service related labels Oct 21, 2024
@cyyeh cyyeh marked this pull request as ready for review October 22, 2024 01:14
@cyyeh cyyeh requested a review from paopa October 22, 2024 01:14
Comment on lines 261 to 267
api_results += [
AskResult(**result) for result in valid_sql_summary_results
]
self._ask_results[query_id] = AskResultResponse(
status="generating",
response=api_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 the results might be more than three. Do we need to remove any after the third candidate?

Comment on lines 291 to 293
api_results += [
AskResult(**result) for result in valid_sql_summary_results
]
Copy link
Contributor

Choose a reason for hiding this comment

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

the reference is already pointed to the attribute of response object, thus add new results into this variable, it might be occurring more than three candidates back. i think we need to check how many candidates had before putting them into the array.

Copy link
Contributor

Choose a reason for hiding this comment

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

Here is the example to show the case

from dataclasses import dataclass


@dataclass
class Demo:
    id: str


@dataclass
class Resp:
    demos: list[Demo]


results = []

results += [Demo(id="1")]

resp = Resp(demos=results)

print(resp)


results += [Demo(id="2")]

print(resp)

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

@cyyeh cyyeh merged commit 1c83788 into main Oct 22, 2024
@cyyeh cyyeh deleted the chore/ai-service/refine-sql-generation branch October 22, 2024 03:46
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