client.upload_file()、client.list_files()、client.get_file()、client.get_file_content()。
list_files()はSDKで利用できますが、GET /filesは現在file_list_not_supported_with_shared_gateway_keyを返します。
(共有ゲートウェイキー使用時)。アップロードしたファイルのIDを保存し、そのIDで直接取得してください。Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Python SDKで/filesを呼び出します。
client.upload_file()、client.list_files()、client.get_file()、client.get_file_content()。
uploaded = client.upload_file(
purpose="batch",
file="data:application/json;base64,eyJ0ZXN0Ijp0cnVlfQ==",
)
file_obj = client.get_file(uploaded["id"])
file_bytes = client.get_file_content(uploaded["id"])
print(uploaded)
print(file_obj)
print(file_bytes[:20])
list_files()はSDKで利用できますが、GET /filesは現在file_list_not_supported_with_shared_gateway_keyを返します。
(共有ゲートウェイキー使用時)。アップロードしたファイルのIDを保存し、そのIDで直接取得してください。