Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 3.03 KB

ModelConfig.md

File metadata and controls

50 lines (44 loc) · 3.03 KB

LaunchDarklyApi::ModelConfig

Properties

Name Type Description Notes
_access AiConfigsAccess [optional]
_maintainer AIConfigMaintainer [optional]
name String Human-readable name of the model
key String Unique key for the model config in the project, in the format `Provider.model-id`. Use this value as `modelConfigKey` on a config variation.
id String Model ID that the provider's API uses. This is different from `key`. Use this value as `modelName` on a config variation.
icon String Icon for the model [optional]
provider String Provider for the model. Matches the provider prefix of `key`. [optional]
global Boolean Whether the model is in the LaunchDarkly global catalog. Global models are read-only. Model configs that you create are always custom, with `global` set to `false`.
params Object Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider's API accepts, for example `{"temperature": 0.7, "maxTokens": 4096}`. [optional]
custom_params Object Freeform JSON object. LaunchDarkly does not validate the keys. In a model config, `params` and `customParams` hold parameters that the provider's API accepts, for example `{"temperature": 0.7, "maxTokens": 4096}`. [optional]
tags Array<String> Tags for the model config. Tags can be used in custom role policies.
version Integer Version of the model config. Starts at 1, and each update that changes the model config adds a new version.
cost_per_input_token Float Cost per input token in USD [optional]
cost_per_output_token Float Cost per output token in USD [optional]
cost_per_cached_input_token Float Cost per cached input token in USD [optional]
is_restricted Boolean Whether the model is on the project's restricted list. Config variations cannot select a restricted model. To change this, use the add or remove restricted models endpoints.
used_in_count Integer Number of distinct AgentControl configs that reference this model [optional]

Example

require 'launchdarkly_api'

instance = LaunchDarklyApi::ModelConfig.new(
  _access: null,
  _maintainer: null,
  name: GPT Image 2,
  key: OpenAI.gpt-image-2,
  id: gpt-image-2,
  icon: openai,
  provider: OpenAI,
  global: null,
  params: null,
  custom_params: null,
  tags: [&quot;image&quot;],
  version: 2,
  cost_per_input_token: 0.0000050,
  cost_per_output_token: 0.000040,
  cost_per_cached_input_token: 0.00000125,
  is_restricted: null,
  used_in_count: null
)