View Source ExOpenAI.Components.CreateModelResponseProperties (ex_openai.ex v2.0.0-beta2)

Module for representing the OpenAI schema CreateModelResponseProperties.

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 the user field. 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()
    An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability.
    Constraints: minimum: 0, maximum: 20

  • :top_p - optional - number() | any()

  • :user - optional - String.t()
    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.

Summary

Types

@type t() :: %ExOpenAI.Components.CreateModelResponseProperties{
  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() | nil,
  top_p: (number() | any()) | nil,
  user: String.t() | nil
}