@@ -1554,6 +1554,50 @@ export interface RetrieveAndGenerateInput {
15541554 text : string | undefined ;
15551555}
15561556
1557+ /**
1558+ * @public
1559+ * @enum
1560+ */
1561+ export const SearchType = {
1562+ HYBRID : "HYBRID" ,
1563+ SEMANTIC : "SEMANTIC" ,
1564+ } as const ;
1565+
1566+ /**
1567+ * @public
1568+ */
1569+ export type SearchType = ( typeof SearchType ) [ keyof typeof SearchType ] ;
1570+
1571+ /**
1572+ * @public
1573+ * Knowledge base vector search configuration
1574+ */
1575+ export interface KnowledgeBaseVectorSearchConfiguration {
1576+ /**
1577+ * @public
1578+ * Top-K results to retrieve from knowledge base.
1579+ */
1580+ numberOfResults ?: number ;
1581+
1582+ /**
1583+ * @public
1584+ * Override the type of query to be performed on data store
1585+ */
1586+ overrideSearchType ?: SearchType ;
1587+ }
1588+
1589+ /**
1590+ * @public
1591+ * Search parameters for retrieving from knowledge base.
1592+ */
1593+ export interface KnowledgeBaseRetrievalConfiguration {
1594+ /**
1595+ * @public
1596+ * Knowledge base vector search configuration
1597+ */
1598+ vectorSearchConfiguration : KnowledgeBaseVectorSearchConfiguration | undefined ;
1599+ }
1600+
15571601/**
15581602 * @public
15591603 * Configurations for retrieval and generation for knowledge base.
@@ -1570,6 +1614,12 @@ export interface KnowledgeBaseRetrieveAndGenerateConfiguration {
15701614 * Arn of a Bedrock model.
15711615 */
15721616 modelArn : string | undefined ;
1617+
1618+ /**
1619+ * @public
1620+ * Search parameters for retrieving from knowledge base.
1621+ */
1622+ retrievalConfiguration ?: KnowledgeBaseRetrievalConfiguration ;
15731623}
15741624
15751625/**
@@ -1679,30 +1729,6 @@ export interface RetrieveAndGenerateResponse {
16791729 citations ?: Citation [ ] ;
16801730}
16811731
1682- /**
1683- * @public
1684- * Knowledge base vector search configuration
1685- */
1686- export interface KnowledgeBaseVectorSearchConfiguration {
1687- /**
1688- * @public
1689- * Top-K results to retrieve from knowledge base.
1690- */
1691- numberOfResults : number | undefined ;
1692- }
1693-
1694- /**
1695- * @public
1696- * Search parameters for retrieving from knowledge base.
1697- */
1698- export interface KnowledgeBaseRetrievalConfiguration {
1699- /**
1700- * @public
1701- * Knowledge base vector search configuration
1702- */
1703- vectorSearchConfiguration : KnowledgeBaseVectorSearchConfiguration | undefined ;
1704- }
1705-
17061732/**
17071733 * @public
17081734 * Knowledge base input query.
@@ -1811,12 +1837,72 @@ export const InvokeAgentRequestFilterSensitiveLog = (obj: InvokeAgentRequest): a
18111837 ...( obj . inputText && { inputText : SENSITIVE_STRING } ) ,
18121838} ) ;
18131839
1840+ /**
1841+ * @internal
1842+ */
1843+ export const TextResponsePartFilterSensitiveLog = ( obj : TextResponsePart ) : any => ( {
1844+ ...obj ,
1845+ } ) ;
1846+
1847+ /**
1848+ * @internal
1849+ */
1850+ export const GeneratedResponsePartFilterSensitiveLog = ( obj : GeneratedResponsePart ) : any => ( {
1851+ ...obj ,
1852+ ...( obj . textResponsePart && { textResponsePart : SENSITIVE_STRING } ) ,
1853+ } ) ;
1854+
1855+ /**
1856+ * @internal
1857+ */
1858+ export const RetrievalResultContentFilterSensitiveLog = ( obj : RetrievalResultContent ) : any => ( {
1859+ ...obj ,
1860+ } ) ;
1861+
1862+ /**
1863+ * @internal
1864+ */
1865+ export const RetrievalResultLocationFilterSensitiveLog = ( obj : RetrievalResultLocation ) : any => ( {
1866+ ...obj ,
1867+ } ) ;
1868+
1869+ /**
1870+ * @internal
1871+ */
1872+ export const RetrievedReferenceFilterSensitiveLog = ( obj : RetrievedReference ) : any => ( {
1873+ ...obj ,
1874+ ...( obj . content && { content : SENSITIVE_STRING } ) ,
1875+ ...( obj . location && { location : SENSITIVE_STRING } ) ,
1876+ } ) ;
1877+
1878+ /**
1879+ * @internal
1880+ */
1881+ export const CitationFilterSensitiveLog = ( obj : Citation ) : any => ( {
1882+ ...obj ,
1883+ ...( obj . generatedResponsePart && {
1884+ generatedResponsePart : GeneratedResponsePartFilterSensitiveLog ( obj . generatedResponsePart ) ,
1885+ } ) ,
1886+ ...( obj . retrievedReferences && {
1887+ retrievedReferences : obj . retrievedReferences . map ( ( item ) => RetrievedReferenceFilterSensitiveLog ( item ) ) ,
1888+ } ) ,
1889+ } ) ;
1890+
1891+ /**
1892+ * @internal
1893+ */
1894+ export const AttributionFilterSensitiveLog = ( obj : Attribution ) : any => ( {
1895+ ...obj ,
1896+ ...( obj . citations && { citations : obj . citations . map ( ( item ) => CitationFilterSensitiveLog ( item ) ) } ) ,
1897+ } ) ;
1898+
18141899/**
18151900 * @internal
18161901 */
18171902export const PayloadPartFilterSensitiveLog = ( obj : PayloadPart ) : any => ( {
18181903 ...obj ,
18191904 ...( obj . bytes && { bytes : SENSITIVE_STRING } ) ,
1905+ ...( obj . attribution && { attribution : AttributionFilterSensitiveLog ( obj . attribution ) } ) ,
18201906} ) ;
18211907
18221908/**
@@ -1865,6 +1951,16 @@ export const FinalResponseFilterSensitiveLog = (obj: FinalResponse): any => ({
18651951 ...( obj . text && { text : SENSITIVE_STRING } ) ,
18661952} ) ;
18671953
1954+ /**
1955+ * @internal
1956+ */
1957+ export const KnowledgeBaseLookupOutputFilterSensitiveLog = ( obj : KnowledgeBaseLookupOutput ) : any => ( {
1958+ ...obj ,
1959+ ...( obj . retrievedReferences && {
1960+ retrievedReferences : obj . retrievedReferences . map ( ( item ) => RetrievedReferenceFilterSensitiveLog ( item ) ) ,
1961+ } ) ,
1962+ } ) ;
1963+
18681964/**
18691965 * @internal
18701966 */
@@ -1881,6 +1977,9 @@ export const ObservationFilterSensitiveLog = (obj: Observation): any => ({
18811977 ...( obj . actionGroupInvocationOutput && {
18821978 actionGroupInvocationOutput : ActionGroupInvocationOutputFilterSensitiveLog ( obj . actionGroupInvocationOutput ) ,
18831979 } ) ,
1980+ ...( obj . knowledgeBaseLookupOutput && {
1981+ knowledgeBaseLookupOutput : KnowledgeBaseLookupOutputFilterSensitiveLog ( obj . knowledgeBaseLookupOutput ) ,
1982+ } ) ,
18841983 ...( obj . finalResponse && { finalResponse : FinalResponseFilterSensitiveLog ( obj . finalResponse ) } ) ,
18851984 ...( obj . repromptResponse && { repromptResponse : SENSITIVE_STRING } ) ,
18861985} ) ;
@@ -2030,6 +2129,7 @@ export const RetrieveAndGenerateOutputFilterSensitiveLog = (obj: RetrieveAndGene
20302129export const RetrieveAndGenerateResponseFilterSensitiveLog = ( obj : RetrieveAndGenerateResponse ) : any => ( {
20312130 ...obj ,
20322131 ...( obj . output && { output : SENSITIVE_STRING } ) ,
2132+ ...( obj . citations && { citations : obj . citations . map ( ( item ) => CitationFilterSensitiveLog ( item ) ) } ) ,
20332133} ) ;
20342134
20352135/**
@@ -2047,6 +2147,15 @@ export const RetrieveRequestFilterSensitiveLog = (obj: RetrieveRequest): any =>
20472147 ...( obj . retrievalQuery && { retrievalQuery : SENSITIVE_STRING } ) ,
20482148} ) ;
20492149
2150+ /**
2151+ * @internal
2152+ */
2153+ export const KnowledgeBaseRetrievalResultFilterSensitiveLog = ( obj : KnowledgeBaseRetrievalResult ) : any => ( {
2154+ ...obj ,
2155+ ...( obj . content && { content : SENSITIVE_STRING } ) ,
2156+ ...( obj . location && { location : SENSITIVE_STRING } ) ,
2157+ } ) ;
2158+
20502159/**
20512160 * @internal
20522161 */
0 commit comments