Upload files to OpenAI
from obiguard import Obiguard client = Obiguard( obiguard_api_key="OBIGUARD_API_KEY", # Your Obiguard API key ) upload_file_response = client.files.create( purpose="batch", file=open("file.pdf", "rb") ) print(upload_file_response)
from obiguard import Obiguard client = Obiguard( obiguard_api_key="OBIGUARD_API_KEY", # Your Obiguard API key ) files = client.files.list() print(files)
from obiguard import Obiguard client = Obiguard( obiguard_api_key="OBIGUARD_API_KEY", # Your Obiguard API key ) file = client.files.retrieve(file_id="file_id") print(file)
from obiguard import Obiguard client = Obiguard( obiguard_api_key="OBIGUARD_API_KEY", # Your Obiguard API key ) file_content = client.files.content(file_id="file_id") print(file_content)
from obiguard import Obiguard client = Obiguard( obiguard_api_key="OBIGUARD_API_KEY", # Your Obiguard API key ) delete_file_response = client.files.delete(file_id="file_id") print(delete_file_response)