Storage doesn’t save the API keys.
When agent is loaded from the stage, How can auth info added to the agent object?
Code is following.
agent = Agent(storage=storage)
agent.from_agent_session(session)
Storage doesn’t save the API keys.
When agent is loaded from the stage, How can auth info added to the agent object?
Code is following.
agent = Agent(storage=storage)
agent.from_agent_session(session)
Hi @rvm_1
Thank you for reaching out and using Phidata! I’ve tagged the relevant engineers to assist you with your query. We aim to respond within 24 hours.
If this is urgent, please feel free to let us know, and we’ll do our best to prioritize it.
Thanks for your patience!
Hey @rvm_1, Agent class has a user_data
param that you can use to pass auth info that will be upserted to the storage.
So, it would look something like this
agent = Agent(storage=storage, user_data={"token":""}
This is just an example and you can put anything in user_data. It expects dictionary.
Azure Openai API key is removed from the agent model during storage.
I want to set this this api key again after loading the agent from the storage.
@rvm_1, you can try using the write_to_storage
function available in the Agent class that will upsert the data to the storage