Class: ActiveAgent::Providers::OpenRouter::Requests::Prediction

Inherits:
Common::BaseModel show all
Defined in:
lib/active_agent/providers/open_router/requests/prediction.rb

Overview

Prediction configuration for prefilling responses

Allows prefilling the start of the model’s response. When provided, the model continues from this predicted content.

Examples:

Content prediction

prediction = Prediction.new(
  type: 'content',
  content: 'Once upon a time'
)

See Also:

Instance Attribute Summary collapse

Method Summary

Methods inherited from Common::BaseModel

#<=>, #==, attribute, #deep_compact, #deep_dup, delegate_attributes, drop_attributes, inherited, #initialize, #inspect, keys, #merge!, required_attributes, #serialize, #to_h, #to_hash

Constructor Details

This class inherits a constructor from ActiveAgent::Providers::Common::BaseModel

Instance Attribute Details

#contentString

Returns predicted content to prefill the response.

Returns:

  • (String)

    predicted content to prefill the response



26
# File 'lib/active_agent/providers/open_router/requests/prediction.rb', line 26

attribute :content, :string

#typeString

Returns prediction type (currently only ‘content’ is supported).

Returns:

  • (String)

    prediction type (currently only ‘content’ is supported)



22
# File 'lib/active_agent/providers/open_router/requests/prediction.rb', line 22

attribute :type, :string