Class: Tep::Llm::OpenAI::Completion
- Inherits:
-
Object
- Object
- Tep::Llm::OpenAI::Completion
- Defined in:
- lib/tep/openai_server.rb
Overview
A backend’s generation result: the decoded text + token usage.
Instance Attribute Summary collapse
-
#completion_tokens ⇒ Object
Returns the value of attribute completion_tokens.
-
#prompt_tokens ⇒ Object
Returns the value of attribute prompt_tokens.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize ⇒ Completion
constructor
A new instance of Completion.
Constructor Details
#initialize ⇒ Completion
Returns a new instance of Completion.
263 264 265 266 267 |
# File 'lib/tep/openai_server.rb', line 263 def initialize @text = "" @prompt_tokens = 0 @completion_tokens = 0 end |
Instance Attribute Details
#completion_tokens ⇒ Object
Returns the value of attribute completion_tokens.
261 262 263 |
# File 'lib/tep/openai_server.rb', line 261 def completion_tokens @completion_tokens end |
#prompt_tokens ⇒ Object
Returns the value of attribute prompt_tokens.
261 262 263 |
# File 'lib/tep/openai_server.rb', line 261 def prompt_tokens @prompt_tokens end |
#text ⇒ Object
Returns the value of attribute text.
261 262 263 |
# File 'lib/tep/openai_server.rb', line 261 def text @text end |