Skip to content
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

fix: some small changes of ai assistant #1290

Merged
merged 5 commits into from
Jun 29, 2023
Merged

Conversation

jczhong84
Copy link
Collaborator

@jczhong84 jczhong84 commented Jun 28, 2023

  1. use text area instead of input for the text2sql question to support multiple lines
  2. add another button of "apply and run" to run the query directly
  3. generate a title along with the query generation and query cell title will be updated once applied
  4. updated the title generation prompt. Seems it will not add quotes and final period with gpt3.5 anymore.
  5. updated the text2sql prompt to include the question being asked in a comment of the query
  6. pass query cell id instead of the query for title generation
  7. log cell id for title generation and auto fix

Copy link
Collaborator

@czgu czgu left a comment

Choose a reason for hiding this comment

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

lgtm, if I recall correctly, the title change is debounced. So when user clicks on title generation, would they get the latest version of the query in the backend?

@@ -24,136 +24,155 @@ interface IProps {
isQueryCollapsed: boolean;

changeCellContext?: (context: string) => void;
onChangeFromAI?: (query: string, run: boolean) => void;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why don't we just use changeCellContext but also add an optional parameter to run?

@@ -45,7 +46,10 @@ export const QueryCellTitle: React.FC<IQueryCellTitleProps> = ({
}
}, [streamStatus, title]);

const handleTitleGenerationClick = useCallback(() => {
const handleTitleGenerationClick = useCallback(async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

use forceSaveDataDoc method instead of calling api directly

@czgu czgu merged commit 3f61155 into pinterest:master Jun 29, 2023
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* fix: some small changes of ai assistant

* fix prompt template return type

* comments

* force save cell

* remove console.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants