Class: Telnyx::Models::AI::OpenAI::EmbeddingCreateEmbeddingsParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb

Overview

Defined Under Namespace

Modules: EncodingFormat, Input

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(input:, model:, dimensions: nil, encoding_format: nil, user: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Telnyx::Models::AI::OpenAI::EmbeddingCreateEmbeddingsParams for more details.

Parameters:

  • input (String, Array<String>)

    Input text to embed. Can be a string or array of strings.

  • model (String)

    ID of the model to use. Use the List embedding models endpoint to see available

  • dimensions (Integer) (defaults to: nil)

    The number of dimensions the resulting output embeddings should have. Only suppo

  • encoding_format (Symbol, Telnyx::Models::AI::OpenAI::EmbeddingCreateEmbeddingsParams::EncodingFormat) (defaults to: nil)

    The format to return the embeddings in.

  • user (String) (defaults to: nil)

    A unique identifier representing your end-user for monitoring and abuse detectio

  • request_options (Telnyx::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb', line 46

Instance Attribute Details

#dimensionsInteger?

The number of dimensions the resulting output embeddings should have. Only supported in some models.

Returns:

  • (Integer, nil)


30
# File 'lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb', line 30

optional :dimensions, Integer

#encoding_formatSymbol, ...

The format to return the embeddings in.



36
37
# File 'lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb', line 36

optional :encoding_format,
enum: -> { Telnyx::AI::OpenAI::EmbeddingCreateEmbeddingsParams::EncodingFormat }

#inputString+

Input text to embed. Can be a string or array of strings.

Returns:

  • (String, Array<String>)


16
# File 'lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb', line 16

required :input, union: -> { Telnyx::AI::OpenAI::EmbeddingCreateEmbeddingsParams::Input }

#modelString

ID of the model to use. Use the List embedding models endpoint to see available models.

Returns:

  • (String)


23
# File 'lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb', line 23

required :model, String

#userString?

A unique identifier representing your end-user for monitoring and abuse detection.

Returns:

  • (String, nil)


44
# File 'lib/telnyx/models/ai/openai/embedding_create_embeddings_params.rb', line 44

optional :user, String