Skip to content

Commit

Permalink
fix(bedrock): fix agent version issue (#441)
Browse files Browse the repository at this point in the history
  • Loading branch information
krokoko authored May 9, 2024
1 parent 8c1aed5 commit 77aa63c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ def list_unused_agent_versions(agent_id: str, session: boto3.Session) -> List[in

def get_version(routing_configuration: List[Dict]) -> str:
if len(routing_configuration) == 1:
return routing_configuration[0]["agentVersion"]
try:
return routing_configuration[0]["agentVersion"]
except KeyError:
return None
else:
return None

Expand Down

0 comments on commit 77aa63c

Please sign in to comment.