Skip to content

Conversation

@arturantonnikau
Copy link
Contributor

No description provided.


gem 'rake', '~> 12.0'
gem 'rspec', '~> 3.0'
gem 'activesupport'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend to remove it.

uri = URI(auth_endpoint)
req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
req.body = creds.to_json
api_execute(:post, uri, creds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to add error handling for requests. No errors are raised if the server is unavailable or the credentials are wrong. I'm just getting this unclear error when running specs.

Снимок экрана 2024-08-22 в 12 48 12

uri = URI(auth_endpoint)
req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json')
req.body = creds.to_json
api_execute(:post, uri, creds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I'm getting stack level too deep error in this spec spec/rspec/llama/api_client_spec.rb:15

Снимок экрана 2024-08-22 в 13 33 29

module Helpers
module Executor

def execute_test_run(prompt_id: nil, assertion_id: nil, model_version_id: nil)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update helpers_spec

Снимок экрана 2024-08-22 в 13 37 23

# Enable flags like --only-failures and --next-failure
config.api_endpoint = 'https://api.example.com'
config.auth_endpoint = 'https://api.example.com/authenticate'
config.auth_endpoint = 'https://api.example.com/users/sign_in'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this spec is useless spec/rspec/llama/configuration_spec.rb, it fails when I change credentials or set custom endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants