Skip to content

Commit

Permalink
AWS Config adds support for service-linked recorders, a new type of C…
Browse files Browse the repository at this point in the history
…onfig recorder managed by AWS services to record specific subsets of resource configuration data and functioning independently from customer managed AWS Config recorders.

Amazon CloudWatch Observability Admin adds the ability to audit telemetry configuration for AWS resources in customers AWS Accounts and Organizations. The release introduces new APIs to turn on/off the new experience, which supports discovering supported AWS resources and their state of telemetry.
Add support for specifying embeddingDataType, either FLOAT32 or BINARY
This release adds EFA support to increase FSx for Lustre file systems' throughput performance to a single client instance. This can be done by specifying EfaEnabled=true at the time of creation of Persistent_2 file systems.
  • Loading branch information
aws-sdk-cpp-automation committed Nov 27, 2024
1 parent 7ce35d6 commit c95e71a
Show file tree
Hide file tree
Showing 145 changed files with 9,734 additions and 292 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.11.456
1.11.457
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

#pragma once
#include <aws/bedrock-agent/BedrockAgent_EXPORTS.h>
#include <aws/bedrock-agent/model/EmbeddingDataType.h>
#include <utility>

namespace Aws
{
Expand Down Expand Up @@ -46,10 +48,31 @@ namespace Model
inline void SetDimensions(int value) { m_dimensionsHasBeenSet = true; m_dimensions = value; }
inline BedrockEmbeddingModelConfiguration& WithDimensions(int value) { SetDimensions(value); return *this;}
///@}

///@{
/**
* <p>The data type for the vectors when using a model to convert text into vector
* embeddings. The model must support the specified data type for vector
* embeddings. Floating-point (float32) is the default data type, and is supported
* by most models for vector embeddings. See <a
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-supported.html">Supported
* embeddings models</a> for information on the available models and their vector
* data types.</p>
*/
inline const EmbeddingDataType& GetEmbeddingDataType() const{ return m_embeddingDataType; }
inline bool EmbeddingDataTypeHasBeenSet() const { return m_embeddingDataTypeHasBeenSet; }
inline void SetEmbeddingDataType(const EmbeddingDataType& value) { m_embeddingDataTypeHasBeenSet = true; m_embeddingDataType = value; }
inline void SetEmbeddingDataType(EmbeddingDataType&& value) { m_embeddingDataTypeHasBeenSet = true; m_embeddingDataType = std::move(value); }
inline BedrockEmbeddingModelConfiguration& WithEmbeddingDataType(const EmbeddingDataType& value) { SetEmbeddingDataType(value); return *this;}
inline BedrockEmbeddingModelConfiguration& WithEmbeddingDataType(EmbeddingDataType&& value) { SetEmbeddingDataType(std::move(value)); return *this;}
///@}
private:

int m_dimensions;
bool m_dimensionsHasBeenSet = false;

EmbeddingDataType m_embeddingDataType;
bool m_embeddingDataTypeHasBeenSet = false;
};

} // namespace Model
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#pragma once
#include <aws/bedrock-agent/BedrockAgent_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

namespace Aws
{
namespace BedrockAgent
{
namespace Model
{
enum class EmbeddingDataType
{
NOT_SET,
FLOAT32,
BINARY
};

namespace EmbeddingDataTypeMapper
{
AWS_BEDROCKAGENT_API EmbeddingDataType GetEmbeddingDataTypeForName(const Aws::String& name);

AWS_BEDROCKAGENT_API Aws::String GetNameForEmbeddingDataType(EmbeddingDataType value);
} // namespace EmbeddingDataTypeMapper
} // namespace Model
} // namespace BedrockAgent
} // namespace Aws
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ namespace Model

BedrockEmbeddingModelConfiguration::BedrockEmbeddingModelConfiguration() :
m_dimensions(0),
m_dimensionsHasBeenSet(false)
m_dimensionsHasBeenSet(false),
m_embeddingDataType(EmbeddingDataType::NOT_SET),
m_embeddingDataTypeHasBeenSet(false)
{
}

Expand All @@ -39,6 +41,13 @@ BedrockEmbeddingModelConfiguration& BedrockEmbeddingModelConfiguration::operator
m_dimensionsHasBeenSet = true;
}

if(jsonValue.ValueExists("embeddingDataType"))
{
m_embeddingDataType = EmbeddingDataTypeMapper::GetEmbeddingDataTypeForName(jsonValue.GetString("embeddingDataType"));

m_embeddingDataTypeHasBeenSet = true;
}

return *this;
}

Expand All @@ -52,6 +61,11 @@ JsonValue BedrockEmbeddingModelConfiguration::Jsonize() const

}

if(m_embeddingDataTypeHasBeenSet)
{
payload.WithString("embeddingDataType", EmbeddingDataTypeMapper::GetNameForEmbeddingDataType(m_embeddingDataType));
}

return payload;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

#include <aws/bedrock-agent/model/EmbeddingDataType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>

using namespace Aws::Utils;


namespace Aws
{
namespace BedrockAgent
{
namespace Model
{
namespace EmbeddingDataTypeMapper
{

static const int FLOAT32_HASH = HashingUtils::HashString("FLOAT32");
static const int BINARY_HASH = HashingUtils::HashString("BINARY");


EmbeddingDataType GetEmbeddingDataTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == FLOAT32_HASH)
{
return EmbeddingDataType::FLOAT32;
}
else if (hashCode == BINARY_HASH)
{
return EmbeddingDataType::BINARY;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EmbeddingDataType>(hashCode);
}

return EmbeddingDataType::NOT_SET;
}

Aws::String GetNameForEmbeddingDataType(EmbeddingDataType enumValue)
{
switch(enumValue)
{
case EmbeddingDataType::NOT_SET:
return {};
case EmbeddingDataType::FLOAT32:
return "FLOAT32";
case EmbeddingDataType::BINARY:
return "BINARY";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}

return {};
}
}

} // namespace EmbeddingDataTypeMapper
} // namespace Model
} // namespace BedrockAgent
} // namespace Aws
Loading

0 comments on commit c95e71a

Please sign in to comment.