Class: Braintrust::Resources::Project::Logs
- Inherits:
-
Object
- Object
- Braintrust::Resources::Project::Logs
- Defined in:
- lib/braintrust/resources/project/logs.rb
Instance Method Summary collapse
-
#feedback(project_id, params = {}, opts = {}) ⇒ nil
Log feedback for a set of project logs events.
-
#fetch(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::LogFetchResponse
Fetch the events in a project logs.
-
#fetch_post(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::LogFetchPostResponse
Fetch the events in a project logs.
-
#initialize(client:) ⇒ Logs
constructor
A new instance of Logs.
-
#insert(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::LogInsertResponse
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/project/logs.rb', line 7 def initialize(client:) @client = client end |
Instance Method Details
#feedback(project_id, params = {}, opts = {}) ⇒ nil
Log feedback for a set of project logs events
21 22 23 24 25 26 27 28 |
# File 'lib/braintrust/resources/project/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] = NilClass @client.request(req, opts) end |
#fetch(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::LogFetchResponse
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/project/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::LogFetchResponse @client.request(req, opts) end |
#fetch_post(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::LogFetchPostResponse
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
144 145 146 147 148 149 150 151 |
# File 'lib/braintrust/resources/project/logs.rb', line 144 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::LogFetchPostResponse @client.request(req, opts) end |
#insert(project_id, params = {}, opts = {}) ⇒ Braintrust::Models::LogInsertResponse
Insert a set of events into the project logs
163 164 165 166 167 168 169 170 |
# File 'lib/braintrust/resources/project/logs.rb', line 163 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::LogInsertResponse @client.request(req, opts) end |