You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems the the ingest API requires the header for this request to be set to the correct type for the import to work. The IngestKnowledgeBaseDocumentsRequest doesn't have any attributes to control the ContentType.
The dataSourceType that you specified in CUSTOM doesn't match the type of the data source specified in the request header. Check that both types match and retry your request.
Regression Issue
Select this option if this issue appears to be a regression.
Expected Behavior
IngestKnowledgeBaseDocumentsRequest needs to offer a content type attribute to be used in the API call.
Current Behavior
The dataSourceType that you specified in CUSTOM doesn't match the type of the data source specified in the request header. Check that both types match and retry your request.
Reproduction Steps
IngestKnowledgeBaseDocumentsRequest documentsRequest = new IngestKnowledgeBaseDocumentsRequest()
{
DataSourceId = Environment.GetEnvironmentVariable("BEDROCK_KB_DATASOURCE_ID"),
KnowledgeBaseId = Environment.GetEnvironmentVariable("BEDROCK_KB_ID"),
Documents = new()
{
new()
{
Content = new()
{
DataSourceType = ContentDataSourceType.CUSTOM,
Custom = new()
{
CustomDocumentIdentifier = new()
{
Id = dbMeetingRecord.Id.ToString()
},
InlineContent = new InlineContent()
{
ByteContent = new ByteContentDoc()
{
Data = new MemoryStream(Encoding.UTF8.GetBytes(dbMeetingRecord.MeetingNotes)),
MimeType = "text/plain"
},
TextContent = new TextContentDoc()
{
Data = dbMeetingRecord.MeetingNotes
},
Type = InlineContentType.TEXT
},
SourceType = CustomSourceType.IN_LINE
}
},
Metadata = new()
{
Type = MetadataSourceType.IN_LINE_ATTRIBUTE,
InlineAttributes = new()
{
new()
{
Key = "TeamId", Value = new MetadataAttributeValue()
{
StringValue = dbMeetingRecord.TeamId.ToString(),
Type = MetadataValueType.STRING
}
},
new()
{
Key = "MeetingId", Value = new MetadataAttributeValue()
{
StringValue = dbMeetingRecord.Id.ToString(),
Type = MetadataValueType.STRING
}
}
}
}
}
}
};
IngestKnowledgeBaseDocumentsResponse ingestResponse = await _amazonBedrockAgent.IngestKnowledgeBaseDocumentsAsync(documentsRequest);
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
4.0.0 Preview 5
Targeted .NET Platform
.Net Core 8
Operating System and version
Lambda
The text was updated successfully, but these errors were encountered:
Describe the bug
Seems the the ingest API requires the header for this request to be set to the correct type for the import to work. The IngestKnowledgeBaseDocumentsRequest doesn't have any attributes to control the ContentType.
Link to API Documentation: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_IngestKnowledgeBaseDocuments.html
The dataSourceType that you specified in CUSTOM doesn't match the type of the data source specified in the request header. Check that both types match and retry your request.
Regression Issue
Expected Behavior
IngestKnowledgeBaseDocumentsRequest needs to offer a content type attribute to be used in the API call.
Current Behavior
The dataSourceType that you specified in CUSTOM doesn't match the type of the data source specified in the request header. Check that both types match and retry your request.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
4.0.0 Preview 5
Targeted .NET Platform
.Net Core 8
Operating System and version
Lambda
The text was updated successfully, but these errors were encountered: