mirror of https://github.com/microsoft/autogen.git
* Fix to consider session token in request * Formatted --------- Co-authored-by: Chi Wang <wang.chi@microsoft.com>
This commit is contained in:
parent
1971f85ded
commit
fb788c37d2
|
@ -457,10 +457,13 @@ class OpenAIWrapper:
|
|||
def _configure_openai_config_for_bedrock(self, config: Dict[str, Any], openai_config: Dict[str, Any]) -> None:
|
||||
"""Update openai_config with AWS credentials from config."""
|
||||
required_keys = ["aws_access_key", "aws_secret_key", "aws_region"]
|
||||
|
||||
optional_keys = ["aws_session_token"]
|
||||
for key in required_keys:
|
||||
if key in config:
|
||||
openai_config[key] = config[key]
|
||||
for key in optional_keys:
|
||||
if key in config:
|
||||
openai_config[key] = config[key]
|
||||
|
||||
def _register_default_client(self, config: Dict[str, Any], openai_config: Dict[str, Any]) -> None:
|
||||
"""Create a client with the given config to override openai_config,
|
||||
|
|
Loading…
Reference in New Issue