chat_completion_message
Classes:
Name | Description |
---|---|
ChatCompletionMessage |
|
FunctionCall |
|
ChatCompletionMessage
Attributes:
Name | Type | Description |
---|---|---|
content |
Optional[str]
|
The contents of the message. |
function_call |
Optional[FunctionCall]
|
Deprecated and replaced by |
role |
Literal['assistant']
|
The role of the author of this message. |
tool_calls |
Optional[List[ChatCompletionMessageToolCall]]
|
The tool calls generated by the model, such as function calls. |
content
class-attribute
instance-attribute
The contents of the message.
function_call
class-attribute
instance-attribute
function_call: Optional[FunctionCall] = None
Deprecated and replaced by tool_calls
.
The name and arguments of a function that should be called, as generated by the model.
tool_calls
class-attribute
instance-attribute
tool_calls: Optional[
List[ChatCompletionMessageToolCall]
] = None
The tool calls generated by the model, such as function calls.
FunctionCall
Attributes:
Name | Type | Description |
---|---|---|
arguments |
str
|
The arguments to call the function with, as generated by the model in JSON |
name |
str
|
The name of the function to call. |
arguments
instance-attribute
arguments: str
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.