class

OpenAI::ModelResponseProperties

Inherits JSON::Serializable < Reference < Object

Constructors

new(metadata : Metadata | Nil = nil, top_logprobs : ModelResponsePropertiesTopLogprobs | Nil = nil, temperature : ModelResponsePropertiesTemperature | Nil = nil, top_p : ModelResponsePropertiesTopP | Nil = nil, user : String | Nil = nil, safety_identifier : String | Nil = nil, prompt_cache_key : String | Nil = nil, service_tier : ServiceTier | Nil = nil, prompt_cache_retention : ModelResponsePropertiesPromptCacheRetention | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

metadata
Source
metadata=(metadata : Metadata | Nil)
Source
prompt_cache_key

Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the user field. Learn more.

Source
prompt_cache_key=(prompt_cache_key : String | Nil)

Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the user field. Learn more.

Source
prompt_cache_retention
Source
prompt_cache_retention=(prompt_cache_retention : ModelResponsePropertiesPromptCacheRetention | Nil)
Source
safety_identifier

A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. Learn more.

Source
safety_identifier=(safety_identifier : String | Nil)

A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user. We recommend hashing their username or email address, in order to avoid sending us any identifying information. Learn more.

Source
service_tier
Source
service_tier=(service_tier : ServiceTier | Nil)
Source
temperature
Source
temperature=(temperature : ModelResponsePropertiesTemperature | Nil)
Source
top_logprobs
Source
top_logprobs=(top_logprobs : ModelResponsePropertiesTopLogprobs | Nil)
Source
top_p
Source
top_p=(top_p : ModelResponsePropertiesTopP | Nil)
Source
user

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

Source
user=(user : String | Nil)

This field is being replaced by safety_identifier and prompt_cache_key. Use prompt_cache_key instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cache hit rates by better bucketing similar requests and to help OpenAI detect and prevent abuse. Learn more.

Source