Skip to content

Commit

Permalink
fix issue with added code
Browse files Browse the repository at this point in the history
  • Loading branch information
seawatts committed Dec 30, 2024
1 parent b7a18c2 commit 036dba7
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 7 deletions.
8 changes: 2 additions & 6 deletions engine/baml-lib/llm-client/src/clients/aws_bedrock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,14 @@ impl UnresolvedAwsBedrock {
let session_token = match self.session_token.as_ref() {
Some(session_token) => {
let token = session_token.resolve(ctx)?;
if !token.is_empty() && !token.starts_with('$') {
if !token.is_empty() {
Some(token)
} else {
None
}
}
None => match ctx.get_env_var("AWS_SESSION_TOKEN") {
Ok(session_token)
if !session_token.is_empty() && !session_token.starts_with('$') =>
{
Some(session_token)
}
Ok(session_token) if !session_token.is_empty() => Some(session_token),
_ => None,
},
};
Expand Down
Loading

0 comments on commit 036dba7

Please sign in to comment.