-
Notifications
You must be signed in to change notification settings - Fork 3
add faq #7
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
base: master
Are you sure you want to change the base?
add faq #7
Conversation
submaps
left a comment
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.
Add comments
support_model.py
Outdated
|
|
||
|
|
||
| def get_answer_if_known(query): | ||
| gc = gspread.service_account(filename='ods-qna-dd4a610895ad.json') |
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.
Where is this file? What does its name mean? Is it a file with credentials?
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.
Is it possible to add this info from file to the environment?
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'll send it privately. I'm afraid not, it's not possible. Also, change name to ods-qna-secret.json.
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.
Ok. I think we can create this file from env text variable. I mean it will be better to make one env.sh file with all credentials, tokens and variables. This file of course we will be share privately.
support_model.py
Outdated
| list_of_dicts = questions.get_all_records() | ||
|
|
||
| for dct in list_of_dicts: | ||
| if query in dct['known_question']: |
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.
We have second column known_question_synonimous, so we have to search there too. In addition, I suggest to extract this condition to function is_query_in_row. Further, we will improve this condition.
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.
- add method is_query_in_row
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.
- find in known_question_synonimous
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.
What about tests?
Add getting answers from faq table