pdstools.infinity.resources.knowledge_buddy

Submodules

Classes

KnowledgeBuddy

Helper class that provides a standard way to create an ABC using

Package Contents

class KnowledgeBuddy(client)

Bases: pdstools.infinity.internal._resource.SyncAPIResource

Helper class that provides a standard way to create an ABC using inheritance.

custom_exception_hook
question(question: str, buddy: str, include_search_results: bool = False, question_source: str | None = None, question_tag: str | None = None, additional_text_inputs: List[TextInput] | None = None, filter_attributes: List[FilterAttributes] | None = None, user_name: str | None = None, user_email: str | None = None) BuddyResponse

Send a question to the Knowledge Buddy.

Parameters:
  • question (str: (Required)) – Input the question.

  • buddy (str (Required)) – Input the buddy name. If you do not have the required role to access the buddy, an access error will be displayed.

  • include_search_results (bool (Default: False)) – If set to true, this property returns chunks of data related to each SEARCHRESULTS information variable that is defined for the Knowledge Buddy, which is the same information that is returned during a semantic search.

  • question_source (str (Optional)) – Input a source for the question based on the use case. This information can be used for reporting purposes.

  • question_tag (str (Optional)) – Input a tag for the question based on the use case. This information can be used for reporting purposes.

  • additional_text_inputs (List[TextInput]: (Optional)) – Input the search variable values, where key is the search variable name and value is the data that replaces the variable. Search variables are defined in the Information section of the Knowledge Buddy.

  • filter_attributes (List[FilterAttributes]: (Optional)) – Input the filter attributes to get the filtered chunks from the vector database. User-defined attributes ingested with content can be used as filters. Filters are recommended to improve the semantic search performance. Database indexes can be used further to enhance the search.

  • user_name (Optional[str])

  • user_email (Optional[str])

Return type:

BuddyResponse

feedback(question_id: str, helpful: Literal['Yes', 'No', 'Unsure'] = 'Unsure', comments: str | None = None)

Capture feedback for a question asked to the Knowledge Buddy.

Parameters:
  • question_id (str: (Required)) – The Knowledge Buddy case Id that is required to capture the feedback.

  • helpful (str (Optional)) – Was this comment helpful? Valid values are Yes, No and Unsure. Empty value defaults to Unsure.

  • comments (str (Optional)) – Text of the comment.