View Source ExOpenAI.Components.ModelResponseProperties (ex_openai.ex v2.0.0-beta2)
Module for representing the OpenAI schema ModelResponseProperties.
Fields
:metadata- optional -ExOpenAI.Components.Metadata.t():prompt_cache_key- optional -String.t()
Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces theuserfield. Learn more.:prompt_cache_retention- optional -:"in-memory" | :"24h" | any():safety_identifier- optional -String.t()
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, with a maximum length of 64 characters. We recommend hashing their username or email address, in order to avoid sending us any identifying information. Learn more.
Constraints: maxLength: 64:service_tier- optional -ExOpenAI.Components.ServiceTier.t():temperature- optional -number() | any():top_logprobs- optional -integer() | any():top_p- optional -number() | any():user- optional -String.t()
This field is being replaced bysafety_identifierandprompt_cache_key. Useprompt_cache_keyinstead 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.
Summary
Types
@type t() :: %ExOpenAI.Components.ModelResponseProperties{ metadata: ExOpenAI.Components.Metadata.t() | nil, prompt_cache_key: String.t() | nil, prompt_cache_retention: ((:"in-memory" | :"24h") | any()) | nil, safety_identifier: String.t() | nil, service_tier: ExOpenAI.Components.ServiceTier.t() | nil, temperature: (number() | any()) | nil, top_logprobs: (integer() | any()) | nil, top_p: (number() | any()) | nil, user: String.t() | nil }