add faq#7
Conversation
|
|
||
|
|
||
| def get_answer_if_known(query): | ||
| gc = gspread.service_account(filename='ods-qna-dd4a610895ad.json') |
There was a problem hiding this comment.
Where is this file? What does its name mean? Is it a file with credentials?
There was a problem hiding this comment.
Is it possible to add this info from file to the environment?
There was a problem hiding this comment.
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.
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.
| 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.
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.
- add method is_query_in_row
There was a problem hiding this comment.
- find in known_question_synonimous
Add getting answers from faq table