Class: Anthropic::Resources::Beta::Agents::Versions
- Inherits:
-
Object
- Object
- Anthropic::Resources::Beta::Agents::Versions
- Defined in:
- lib/anthropic/resources/beta/agents/versions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Versions
constructor
private
A new instance of Versions.
-
#list(agent_id, limit: nil, page: nil, betas: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaManagedAgentsAgent>
List Agent Versions.
Constructor Details
#initialize(client:) ⇒ Versions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Versions.
43 44 45 |
# File 'lib/anthropic/resources/beta/agents/versions.rb', line 43 def initialize(client:) @client = client end |
Instance Method Details
#list(agent_id, limit: nil, page: nil, betas: nil, request_options: {}) ⇒ Anthropic::Internal::PageCursor<Anthropic::Models::Beta::BetaManagedAgentsAgent>
List Agent Versions
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/anthropic/resources/beta/agents/versions.rb', line 25 def list(agent_id, params = {}) query_params = [:limit, :page] parsed, = Anthropic::Beta::Agents::VersionListParams.dump_request(params) query = Anthropic::Internal::Util.encode_query_params(parsed.slice(*query_params)) @client.request( method: :get, path: ["v1/agents/%1$s/versions?beta=true", agent_id], query: query, headers: parsed.except(*query_params).transform_keys(betas: "anthropic-beta"), page: Anthropic::Internal::PageCursor, model: Anthropic::Beta::BetaManagedAgentsAgent, options: {extra_headers: {"anthropic-beta" => "managed-agents-2026-04-01"}, **} ) end |