Class: Braintrust::Resources::Projects::Logs
- Inherits:
-
Object
- Object
- Braintrust::Resources::Projects::Logs
- Defined in:
- lib/braintrust/resources/projects/logs.rb
Instance Method Summary collapse
-
#feedback(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::FeedbackResponseSchema
Log feedback for a set of project logs events.
-
#fetch(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::FetchProjectLogsEventsResponse
Fetch the events in a project logs.
-
#fetch_post(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::FetchProjectLogsEventsResponse
Fetch the events in a project logs.
-
#initialize(client:) ⇒ Logs
constructor
A new instance of Logs.
-
#insert(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::InsertEventsResponse
Insert a set of events into the project logs.
Constructor Details
#initialize(client:) ⇒ Logs
Returns a new instance of Logs.
7 8 9 |
# File 'lib/braintrust/resources/projects/logs.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#feedback(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::FeedbackResponseSchema
Log feedback for a set of project logs events
21 22 23 24 25 26 27 28 |
# File 'lib/braintrust/resources/projects/logs.rb', line 21 def feedback(project_id, params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/v1/project_logs/#{project_id}/feedback" req[:body] = params req[:model] = Braintrust::Models::FeedbackResponseSchema @client.request(req, opts) end |
#fetch(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::FetchProjectLogsEventsResponse
Fetch the events in a project logs. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body
79 80 81 82 83 84 85 86 |
# File 'lib/braintrust/resources/projects/logs.rb', line 79 def fetch(project_id, params = {}, opts = {}) req = {} req[:method] = :get req[:path] = "/v1/project_logs/#{project_id}/fetch" req[:query] = params req[:model] = Braintrust::Models::FetchProjectLogsEventsResponse @client.request(req, opts) end |
#fetch_post(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::FetchProjectLogsEventsResponse
Fetch the events in a project logs. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query
148 149 150 151 152 153 154 155 |
# File 'lib/braintrust/resources/projects/logs.rb', line 148 def fetch_post(project_id, params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/v1/project_logs/#{project_id}/fetch" req[:body] = params req[:model] = Braintrust::Models::FetchProjectLogsEventsResponse @client.request(req, opts) end |
#insert(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::InsertEventsResponse
Insert a set of events into the project logs
167 168 169 170 171 172 173 174 |
# File 'lib/braintrust/resources/projects/logs.rb', line 167 def insert(project_id, params = {}, opts = {}) req = {} req[:method] = :post req[:path] = "/v1/project_logs/#{project_id}/insert" req[:body] = params req[:model] = Braintrust::Models::InsertEventsResponse @client.request(req, opts) end |