Class: OpenAI::Models::Chat::ChatCompletionAssistantMessageParam

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/chat/chat_completion_assistant_message_param.rb

Defined Under Namespace

Modules: Content Classes: Audio, FunctionCall

Instance Attribute Summary collapse

Instance Method Summary collapse

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, 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(id: ) ⇒ Object

Some parameter documentations has been truncated, see Audio for more details.

Data about a previous audio response from the model. [Learn more](platform.openai.com/docs/guides/audio).

Parameters:

  • id (String) (defaults to: )

    Unique identifier for a previous audio response from the model.



# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 64

Instance Attribute Details

#audioOpenAI::Models::Chat::ChatCompletionAssistantMessageParam::Audio?

Data about a previous audio response from the model. [Learn more](platform.openai.com/docs/guides/audio).



18
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 18

optional :audio, -> { OpenAI::Chat::ChatCompletionAssistantMessageParam::Audio }, nil?: true

#contentString, ...

The contents of the assistant message. Required unless ‘tool_calls` or `function_call` is specified.



25
26
27
28
29
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 25

optional :content,
union: -> {
  OpenAI::Chat::ChatCompletionAssistantMessageParam::Content
},
nil?: true

#function_callOpenAI::Models::Chat::ChatCompletionAssistantMessageParam::FunctionCall?

Deprecated.

Deprecated and replaced by ‘tool_calls`. The name and arguments of a function that should be called, as generated by the model.



38
39
40
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 38

optional :function_call,
-> { OpenAI::Chat::ChatCompletionAssistantMessageParam::FunctionCall },
nil?: true

#nameString?

An optional name for the participant. Provides the model information to differentiate between participants of the same role.

Returns:

  • (String, nil)


47
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 47

optional :name, String

#refusalString?

The refusal message by the assistant.

Returns:

  • (String, nil)


53
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 53

optional :refusal, String, nil?: true

#roleSymbol, :assistant

The role of the messages author, in this case ‘assistant`.

Returns:

  • (Symbol, :assistant)


11
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 11

required :role, const: :assistant

#tool_callsArray<OpenAI::Models::Chat::ChatCompletionMessageToolCall>?

The tool calls generated by the model, such as function calls.



59
60
61
62
# File 'lib/openai/models/chat/chat_completion_assistant_message_param.rb', line 59

optional :tool_calls,
-> {
  OpenAI::Internal::Type::ArrayOf[OpenAI::Chat::ChatCompletionMessageToolCall]
}