-
Notifications
You must be signed in to change notification settings - Fork 248
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
Conversation
jczhong84
commented
Jun 28, 2023
•
edited
Loading
edited
- use text area instead of input for the text2sql question to support multiple lines
- add another button of "apply and run" to run the query directly
- generate a title along with the query generation and query cell title will be updated once applied
- updated the title generation prompt. Seems it will not add quotes and final period with gpt3.5 anymore.
- updated the text2sql prompt to include the question being asked in a comment of the query
- pass query cell id instead of the query for title generation
- log cell id for title generation and auto fix
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.
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?
querybook/server/lib/ai_assistant/assistants/openai_assistant.py
Outdated
Show resolved
Hide resolved
@@ -24,136 +24,155 @@ interface IProps { | |||
isQueryCollapsed: boolean; | |||
|
|||
changeCellContext?: (context: string) => void; | |||
onChangeFromAI?: (query: string, run: boolean) => void; |
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.
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 () => { |
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.
use forceSaveDataDoc
method instead of calling api directly
* fix: some small changes of ai assistant * fix prompt template return type * comments * force save cell * remove console.log