Class: Cadenya::Resources::Agents::Feedback
- Inherits:
-
Object
- Object
- Cadenya::Resources::Agents::Feedback
- Defined in:
- lib/cadenya/resources/agents/feedback.rb
Overview
Manage AI agents within a workspace. Agents define AI behavior and tool access.
Instance Method Summary collapse
-
#initialize(client:) ⇒ Feedback
constructor
private
A new instance of Feedback.
-
#list(agent_id, workspace_id:, agent_variation_id: nil, created_after: nil, created_before: nil, cursor: nil, include_info: nil, limit: nil, query: nil, sentiment: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Objectives::ObjectiveFeedback>
Some parameter documentations has been truncated, see Models::Agents::FeedbackListParams for more details.
Constructor Details
#initialize(client:) ⇒ Feedback
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 Feedback.
67 68 69 |
# File 'lib/cadenya/resources/agents/feedback.rb', line 67 def initialize(client:) @client = client end |
Instance Method Details
#list(agent_id, workspace_id:, agent_variation_id: nil, created_after: nil, created_before: nil, cursor: nil, include_info: nil, limit: nil, query: nil, sentiment: nil, request_options: {}) ⇒ Cadenya::Internal::CursorPagination<Cadenya::Models::Objectives::ObjectiveFeedback>
Some parameter documentations has been truncated, see Models::Agents::FeedbackListParams for more details.
Lists feedback submitted across all objectives belonging to an agent. Supports search by comment, sentiment filter, agent variation filter, and creation date range. Results are ordered by creation time, newest first.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/cadenya/resources/agents/feedback.rb', line 42 def list(agent_id, params) parsed, = Cadenya::Agents::FeedbackListParams.dump_request(params) query = Cadenya::Internal::Util.encode_query_params(parsed) workspace_id = parsed.delete(:workspace_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["v1/workspaces/%1$s/agents/%2$s/feedback", workspace_id, agent_id], query: query.transform_keys( agent_variation_id: "agentVariationId", created_after: "createdAfter", created_before: "createdBefore", include_info: "includeInfo" ), page: Cadenya::Internal::CursorPagination, model: Cadenya::Objectives::ObjectiveFeedback, options: ) end |