Module: RubyLLM::Providers::OpenAIResponses::Containers
- Defined in:
- lib/ruby_llm/providers/openai_responses/containers.rb
Overview
Containers API support for managing persistent execution environments. Containers can be used with the shell tool and code interpreter.
Class Method Summary collapse
- .container_file_content_url(container_id, file_id) ⇒ Object
- .container_file_url(container_id, file_id) ⇒ Object
- .container_files_url(container_id) ⇒ Object
- .container_url(container_id) ⇒ Object
-
.containers_url ⇒ Object
URL helpers.
-
.create_payload(name: nil, expires_after: nil, file_ids: nil, memory_limit: nil) ⇒ Hash
Build create container payload.
Class Method Details
.container_file_content_url(container_id, file_id) ⇒ Object
28 29 30 |
# File 'lib/ruby_llm/providers/openai_responses/containers.rb', line 28 def container_file_content_url(container_id, file_id) "containers/#{container_id}/files/#{file_id}/content" end |
.container_file_url(container_id, file_id) ⇒ Object
24 25 26 |
# File 'lib/ruby_llm/providers/openai_responses/containers.rb', line 24 def container_file_url(container_id, file_id) "containers/#{container_id}/files/#{file_id}" end |
.container_files_url(container_id) ⇒ Object
20 21 22 |
# File 'lib/ruby_llm/providers/openai_responses/containers.rb', line 20 def container_files_url(container_id) "containers/#{container_id}/files" end |
.container_url(container_id) ⇒ Object
16 17 18 |
# File 'lib/ruby_llm/providers/openai_responses/containers.rb', line 16 def container_url(container_id) "containers/#{container_id}" end |
.containers_url ⇒ Object
URL helpers
12 13 14 |
# File 'lib/ruby_llm/providers/openai_responses/containers.rb', line 12 def containers_url 'containers' end |
.create_payload(name: nil, expires_after: nil, file_ids: nil, memory_limit: nil) ⇒ Hash
Build create container payload
38 39 40 41 42 43 44 45 |
# File 'lib/ruby_llm/providers/openai_responses/containers.rb', line 38 def create_payload(name: nil, expires_after: nil, file_ids: nil, memory_limit: nil) payload = {} payload[:name] = name if name payload[:expires_after] = expires_after if expires_after payload[:file_ids] = file_ids if file_ids payload[:memory_limit] = memory_limit if memory_limit payload end |