SIGN IN SIGN UP
microsoft / autogen UNCLAIMED

A programming framework for agentic AI

0 0 19 Python

Ensure SecretStr is cast to str on load for model clients (#5947)

Currently we have SecretStr type for model clients to promote security
best practices.

- when we dump_component, keys are serialized  as SecreteStr ..
- when we load_component ... SecreteStr type is passed to the client in
the api_key field. This i causes the type problems as the clients expect
a string type.

This PR updates the from_config method for model clients to ensure we
get the value from SecretStr.

Closes #5944
V
Victor Dibia committed
a881cf18ac99d09ed7229809e7cd11c6d090a3e6
Parent: 27fd76d
Committed by Eric Zhu <ekzhu@users.noreply.github.com> on 3/14/2025, 6:36:09 PM