Class: Braintrust::Resources::TopLevel
- Inherits:
 - 
      Object
      
        
- Object
 - Braintrust::Resources::TopLevel
 
 
- Defined in:
 - lib/braintrust/resources/top_level.rb
 
Instance Method Summary collapse
- 
  
    
      #hello_world(opts = {})  ⇒ String 
    
    
  
  
  
  
  
  
  
  
  
    
Default endpoint.
 - 
  
    
      #initialize(client:)  ⇒ TopLevel 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of TopLevel.
 
Constructor Details
#initialize(client:) ⇒ TopLevel
Returns a new instance of TopLevel.
      6 7 8  | 
    
      # File 'lib/braintrust/resources/top_level.rb', line 6 def initialize(client:) @client = client end  | 
  
Instance Method Details
#hello_world(opts = {}) ⇒ String
Default endpoint. Simply replies with 'Hello, World!'. Authorization is not required
      16 17 18 19 20 21 22 23  | 
    
      # File 'lib/braintrust/resources/top_level.rb', line 16 def hello_world(opts = {}) req = {} req[:method] = :get req[:path] = "/v1" req[:headers] = {"Accept" => "text/plain"} req[:model] = String @client.request(req, opts) end  |