QueryDTO Class

POST body schema to query the knowledgebase.

Inheritance
QueryDTO

Constructor

QueryDTO(**kwargs)

Parameters

qna_id
str
Required

Exact qnaId to fetch from the knowledgebase, this field takes priority over question.

question
str
Required

User question to query against the knowledge base.

top
int
Required

Max number of answers to be returned for the question.

user_id
str
Required

Unique identifier for the user.

is_test
bool
Required

Query against the test index.

score_threshold
float
Required

Minimum threshold score for answers.

context
QueryDTOContext
Required

Context object with previous QnA's information.

ranker_type
str
Required

Optional field. Set to 'QuestionOnly' for using a question only Ranker.

strict_filters
list[MetadataDTO]
Required

Find QnAs that are associated with the given list of metadata.

strict_filters_compound_operation_type
str or StrictFiltersCompoundOperationType
Required

Optional field. Set to 'OR' for using OR operation for strict filters. Possible values include: 'AND', 'OR'

answer_span_request
QueryDTOAnswerSpanRequest
Required

To configure Answer span prediction feature.