Class: Forem::Services::AgentSessionService
- Inherits:
-
BaseService
- Object
- BaseService
- Forem::Services::AgentSessionService
- Defined in:
- lib/forem/services/agent_session_service.rb
Overview
Service for interacting with the Forem Agent Sessions API.
Agent sessions enable automated or AI-driven interactions with the Forem platform. The presign endpoint provides a pre-signed URL for uploading assets associated with a session. Access via Client#agent_sessions. All methods inject the client's requestor automatically so no additional configuration is required.
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ AgentSession
Create a new agent session.
-
#list(params = {}, opts = {}) ⇒ Array<AgentSession>
List all agent sessions.
-
#presign(params = {}, opts = {}) ⇒ AgentSession
Obtain a pre-signed URL for uploading a file associated with an agent session.
-
#retrieve(id, opts = {}) ⇒ AgentSession
Retrieve a single agent session by its numeric ID.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Forem::Services::BaseService
Instance Method Details
#create(params = {}, opts = {}) ⇒ AgentSession
Create a new agent session.
46 47 48 |
# File 'lib/forem/services/agent_session_service.rb', line 46 def create(params = {}, opts = {}) AgentSession.create(params, opts_with_requestor(opts)) end |
#list(params = {}, opts = {}) ⇒ Array<AgentSession>
List all agent sessions.
31 32 33 |
# File 'lib/forem/services/agent_session_service.rb', line 31 def list(params = {}, opts = {}) AgentSession.list(params, opts_with_requestor(opts)) end |
#presign(params = {}, opts = {}) ⇒ AgentSession
Obtain a pre-signed URL for uploading a file associated with an agent session.
82 83 84 |
# File 'lib/forem/services/agent_session_service.rb', line 82 def presign(params = {}, opts = {}) AgentSession.presign(params, opts_with_requestor(opts)) end |
#retrieve(id, opts = {}) ⇒ AgentSession
Retrieve a single agent session by its numeric ID.
60 61 62 |
# File 'lib/forem/services/agent_session_service.rb', line 60 def retrieve(id, opts = {}) AgentSession.retrieve(id, opts_with_requestor(opts)) end |