Open Sidebar
Close Sidebar
CrystalDoc.info
Source code
Shards.info
openrouter
v0.5.0
OpenRouter
ApiError
BadGatewayError
BadRequestError
Choice
Client
CompletionRequest
Content
ContentPart
Error
ForbiddenError
Function
FunctionParameter
Message
Model
NonChatChoice
NonStreamingChoice
PaymentRequiredError
RequestTimeoutError
Response
ResponseObject
Role
ServiceUnavailableError
StreamingChoice
Tool
ToolCall
ToolCallArgument
TooManyRequestsError
UnauthorizedError
Usage
Generated using Crystal 1.14.0
2025-01-03 10:41:28 UTC
struct
OpenRouter::
Usage
OpenRouter::Usage
Struct
Value
Object
Defined in:
openrouter/types/response.cr
Constructors
.new
(json : JSON::Any)
Instance Method Summary
#completion
: Int32
#prompt
: Int32
#to_json
(io : IO)
#to_json
(json : JSON::Builder)
#total
: Int32
Constructor Detail
def self.
new
(json : JSON::Any)
#
[
View source
]
Instance Method Detail
def
completion
: Int32
#
[
View source
]
def
prompt
: Int32
#
[
View source
]
def
to_json
(io : IO)
#
[
View source
]
def
to_json
(json : JSON::Builder)
#
[
View source
]
def
total
: Int32
#
[
View source
]