search_relevant_content¶
Operation¶
search_relevant_content
¶
search_relevant_content(request: SearchRelevantContentInput | SearchRelevantContentInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[SearchRelevantContentInputDict]) -> SearchRelevantContentOutput
Searches for relevant content in a Amazon Q Business application based on a query. This operation takes a search query text, the Amazon Q Business application identifier, and optional filters (such as content source and maximum results) as input. It returns a list of relevant content items, where each item includes the content text, the unique document identifier, the document title, the document URI, any relevant document attributes, and score attributes indicating the confidence level of the relevance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
SearchRelevantContentInput | SearchRelevantContentInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[SearchRelevantContentInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
SearchRelevantContentOutput
|
An instance of |
search_relevant_content
async
¶
search_relevant_content(request: SearchRelevantContentInput | SearchRelevantContentInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[SearchRelevantContentInputDict]) -> SearchRelevantContentOutput
Searches for relevant content in a Amazon Q Business application based on a query. This operation takes a search query text, the Amazon Q Business application identifier, and optional filters (such as content source and maximum results) as input. It returns a list of relevant content items, where each item includes the content text, the unique document identifier, the document title, the document URI, any relevant document attributes, and score attributes indicating the confidence level of the relevance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
SearchRelevantContentInput | SearchRelevantContentInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[SearchRelevantContentInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
SearchRelevantContentOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
SearchRelevantContentInputDict
¶
Bases: TypedDict
Dictionary form of SearchRelevantContentInput.
Attributes¶
application_id
instance-attribute
¶
The unique identifier of the Amazon Q Business application to search.
attribute_filter
instance-attribute
¶
attribute_filter: AttributeFilter | AttributeFilterDict | None
Enables filtering of responses based on document attributes or metadata fields.
content_source
instance-attribute
¶
content_source: Required[ContentSource | ContentSourceDict]
The source of content to search in.
SearchRelevantContentInput
dataclass
¶
Bases: _SerdeShape
Dataclass for SearchRelevantContentInput structure.
Attributes¶
application_id
class-attribute
instance-attribute
¶
application_id: str | None = ...
The unique identifier of the Amazon Q Business application to search.
attribute_filter
class-attribute
instance-attribute
¶
attribute_filter: AttributeFilter | None = ...
Enables filtering of responses based on document attributes or metadata fields.
content_source
class-attribute
instance-attribute
¶
content_source: ContentSource | None = ...
The source of content to search in.
max_results
class-attribute
instance-attribute
¶
max_results: int = ...
The maximum number of results to return.
Output¶
SearchRelevantContentOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for SearchRelevantContentOutput structure.
Attributes¶
next_token
class-attribute
instance-attribute
¶
next_token: str | None = ...
The token to use to retrieve the next set of results, if there are any.
relevant_content
class-attribute
instance-attribute
¶
relevant_content: list[RelevantContent] | None = ...
The list of relevant content items found.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.