When I use QnA Maker , Ifound something named CONTEXT-ONLY . What is it used for?
Context-Only is a part of the multi-turn feature for qna-maker. When a question in the qna maker is set to 'Context-Only', a user cannot ask that question and get the answer. It can only be 'asked' as part of the multi-turn flow:
For example, I have a question called 'Shocked Pikachu!' in my qnamaker kb. If this wasn't a Context-Only, a customer could put in 'Shocked Pikachu!' and get the answer 'I'm so confused!'. But because it is Context-Only, the only way to reach this answer is to go through the first question ("What is a pokemon"), and click the "NOT FLUFFY!" follow up:
Notice that 'Shocked Pikachu!' IS listed as question, but is not available to be asked. This is typically not a good idea, you really want your prompts to match the question. I did it to show that clicking 'NOT FLUFFY' lead to that question's answer.
Related
I am using the Reddit API (Pushshift) : https://github.com/pushshift/api
Using the documentation, I understand how I can use this to extract every comment containing the word "covid" that was left in a certain time period:
https://api.pushshift.io/reddit/search/comment?q=covid&after=3h&before=2h&size=1
The output looks something like this:
{"data":[{"subreddit_id":"t5_2qh6p","author_is_blocked":false,"comment_type":null,"edited":false,"author_flair_type":"richtext","total_awards_received":0,"subreddit":"Conservative","author_flair_template_id":null,"id":"j98zf27","gilded":0,"archived":false,"collapsed_reason_code":null,"no_follow":false,"author":"VamboRoolOkay","send_replies":true,"parent_id":41917615743,"score":1,"author_fullname":"t2_7uxkru5f","all_awardings":[],"body":"I will never believe that election fraud wasn't a significant factor. Go ahead - call it a conspiracy theory. But I also maintained that Covid was lab-created. Truth is the Daughter of Time.","top_awarded_type":null,"author_flair_css_class":null,"author_patreon_flair":false,"collapsed":false,"author_flair_richtext":[{"e":"text","t":"Conservative"}],"is_submitter":false,"gildings":{},"collapsed_reason":null,"associated_award":null,"stickied":false,"author_premium":false,"can_gild":true,"link_id":"t3_116l7ct","unrepliable_reason":null,"author_flair_text_color":"dark","score_hidden":true,"permalink":"/r/Conservative/comments/116l7ct/kamala_harris_plans_on_running_with_biden_in_2024/j98zf27/","subreddit_type":"public","locked":false,"author_flair_text":"Conservative","treatment_tags":[],"created_utc":1676866031,"subreddit_name_prefixed":"r/Conservative","controversiality":0,"author_flair_background_color":"","collapsed_because_crowd_control":null,"distinguished":null,"retrieved_utc":1676866047,"updated_utc":1676866048,"body_sha1":"328df3784d15f77b98a84418c4ce720822227cfe","utc_datetime_str":"2023-02-20 04:07:11"}],"error":null,"metadata":{"es":{"took":98,"timed_out":false,"_shards":{"total":828,"successful":828,"skipped":824,"failed":0},"hits":{"total":{"value":573,"relation":"eq"},"max_score":null}},"es_query":{"size":1,"query":{"bool":{"must":[{"bool":{"must":[{"simple_query_string":{"fields":["body"],"query":"covid","default_operator":"and"}},{"range":{"created_utc":{"gte":1676862433000}}},{"range":{"created_utc":{"lt":1676866033000}}}]}}]}},"aggs":{},"sort":{"created_utc":"desc"}},"es_query2":"{\"size\":1,\"query\":{\"bool\":{\"must\":[{\"bool\":{\"must\":[{\"simple_query_string\":{\"fields\":[\"body\"],\"query\":\"covid\",\"default_operator\":\"and\"}},{\"range\":{\"created_utc\":{\"gte\":1676862433000}}},{\"range\":{\"created_utc\":{\"lt\":1676866033000}}}]}}]}},\"aggs\":{},\"sort\":{\"created_utc\":\"desc\"}}","api_launch_time":1673017478.254743,"api_request_start":1676873233.6143198,"api_request_end":1676873233.7406816,"api_total_time":0.12636184692382812}}
My Question: Suppose I identify a post that contains the word "covid" - now, I want to retrieve every comment on this post : Is this possible to do?
For instance, based on the output of these results, I see that :
link_id: t3_116l7ct
parent_id:41917615743
Can I somehow use this information to write an API query to retrieve all comments from this post?
I tried the following query but got an empty result: https://api.pushshift.io/reddit/comment/search/?link_id=t3_116cjib
Thanks!
Here is a sample of the code that I am using would be gratefully if someone can point me in the right direction.
import telebot
bot = telebot.TeleBot("API KEY")
print("Bot starting...")
#bot.message_handler(commands=['quiz'])
def quiz(message):
q = 'What is the capital of Italy?'
answers = ['Rome', 'London', 'Amsterdam']
bot.send_poll(message.chat.id, question=q, options=answers, correct_option_id=0, open_period=5)
bot.polling()
What I'm not sure about on how to make work, is once the question has been answered how to display the correct answer out of the options that are available. For Example the question above, for it to say the correct answer is "Rome" after each question.
Thank You in advance
If you pass type='quiz' to send_poll, then TG will automatically take care of that. See the official docs of sendPoll.
If you don't want to the native quiz interface of TG, you'll have to make the poll non-anonymous. In that case, you'll receive PollAnswer updates when a user makes a vote and you can respond to that update in the way that you want to.
Is it possible to get not selected answers in multiple choice question type marked with "N" when consuming Lime Survey API?
The API method export_responses gives all the question/subquestions/answers codes of user responses in bulk.
But the multiple choice question type signalizes only the selected answers with an "Y". I'd like responses bring the answers not selected with an "N" written. LimeSurvey can do that?
Example:
listTpFisioAt is the question code; text, in listTpFisioAt[text], is an option. When I consume the API to get responses I get something like this:
lisTpFisioAt[Fototerapia]
lisTpFisioAt[Termoterapia]
lisTpFisioAt[Cinesioterapia] Y
lisTpFisioAt[Eletroterapia]
lisTpFisioAt[Hidroterapia] Y
In this case user selected Cinesioterapia and Hidroterapia in Lime Survey interface.
I'd like to get:
lisTpFisioAt[Fototerapia] N
lisTpFisioAt[Termoterapia] N
lisTpFisioAt[Cinesioterapia] Y
lisTpFisioAt[Eletroterapia] N
lisTpFisioAt[Hidroterapia] Y
No, is not possible. Limesurvey fills checked options only. The other ones are left empty. You will need to fill the empty ones yourself by processing the output.
Hope it helps.
Thanks
I am searching for a BAPI to search FI documents, based on the input criteria (document type, posting date,...). Same as it is on the FB03, but the Document List screen, not the screen with only three inputs (Document Number, Company Code, Fiscal Year).
As I don't have the document number, I need the search enabled BAPI.
I am using the BAPI_ACC_DOCUMENT_POST for posting.
Any ideas?
Need to answer my own question - I was hoping to skip these two days of investigation by getting an answer here :)
BAPI_ACC_CO_DOCUMENT_FIND is correct BAPI to use for searching the posted FI documents. What I found out is that if I want to search by posting date, I have to provide Controlling Area (but instead of an error, there is nothing returned).
Loadrunner - how to parameterize changing value in VuGen?
Example: Challenge questions change every time when you try to login and answers to be parameterized according to the question that is displayed.
Challenge question answer logic is that the last word of the question is the answer to be parameterized.
Example: What is your name? Here "name" is the answer for the challenge question.
My scenario is that 3 challenge questions will be populated and 3 answers to be entered, we don't know which question will be populated in what order or so...
Make all of your challenge questions and answers the same for your test users. Correlate for the question. Check for a match to the question and then set the response for the form.
"What is your name?" "Bob"
"What was the name of your first pet?" "Cat"
"What is the name of your elementary school" "My School"
...
FYI
got it solved by using array in web_reg_sav_param function
here we go...
I placed below function above the right place(refering the questions .inf position in the generation log)
web_reg_save_param("CQ",
"LB= ",
"RB=?",
"Ord=ALL",
"Search=Body",
LAST);
then replaced answers with {CQ_1},{CQ_2} and {CQ_3} since i had 3 answers(pasted 2 time each as CQ_ , as i had same answers twice)
web_submit_form("answerChallengeQuestions.faces",
"Snapshot=t74.inf",
ITEMDATA,
"Name=answerChallengeQuestions:answerPasswordBox1", "Value={CQ_1}", ENDITEM,
"Name=answerChallengeQuestions:answerTxtBox1", "Value={CQ_1}", ENDITEM,
"Name=answerChallengeQuestions:answerPasswordBox2", "Value={CQ_2}", ENDITEM,
"Name=answerChallengeQuestions:answerTxtBox2", "Value={CQ_2}", ENDITEM,
"Name=answerChallengeQuestions:answerPasswordBox3", "Value={CQ_3}", ENDITEM,
"Name=answerChallengeQuestions:answerTxtBox3", "Value={CQ_3}", ENDITEM,
Hope this helps
Thanks,
Ramanan M