Encode File To Base64 • AI Agent SDK

encode_file_to_base64: Base64-encode a file.

encode_file_to_base64

Function

</div>

This function is defined in the agents module.

Base64-encode a file.

Signature

python
def encode_file_to_base64(file_path: str) -> str

Parameters

ParamField str

No description available.

Returns

ResponseField str

The result of the operation.

Uses

  • decode
  • base64.b64encode
  • f.read

Used By

Source

View on GitHub

praisonaiagents/agents/agents.py at line 59


Related Documentation