-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
140 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,4 @@ def reset_configuration! | |
@configuration = Configuration.new | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
# lib/chatgpt/errors.rb | ||
module ChatGPT | ||
class Error < StandardError; end | ||
|
||
class APIError < Error | ||
attr_reader :status_code, :error_type | ||
|
||
def initialize(message = nil, status_code = nil, error_type = nil) | ||
@status_code = status_code | ||
@error_type = error_type | ||
super(message) | ||
end | ||
class Error < StandardError; end | ||
|
||
class APIError < Error | ||
attr_reader :status_code, :error_type | ||
|
||
def initialize(message = nil, status_code = nil, error_type = nil) | ||
@status_code = status_code | ||
@error_type = error_type | ||
super(message) | ||
end | ||
|
||
class AuthenticationError < APIError; end | ||
class RateLimitError < APIError; end | ||
class InvalidRequestError < APIError; end | ||
class TokenLimitError < APIError; end | ||
end | ||
end | ||
|
||
class AuthenticationError < APIError; end | ||
class RateLimitError < APIError; end | ||
class InvalidRequestError < APIError; end | ||
class TokenLimitError < APIError; end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# frozen_string_literal: true | ||
|
||
# lib/chatgpt/version.rb | ||
module Chatgpt | ||
module Ruby | ||
VERSION = "2.0.0" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.