GenerationParser
Generation Parser functionality for Parsers integration.
parse_function_call
Parse function call from a dictionary.
Arguments:
Name | Description |
---|---|
function_call_data | The dictionary to parse. |
Returns:
The parsed function call.
parse_tool_calls
Parse tool calls from a dictionary.
Arguments:
Name | Description |
---|---|
tool_calls_data | The dictionary to parse. |
Returns:
The parsed tool calls.
parse_content_list
Parse content list from a dictionary.
Arguments:
Name | Description |
---|---|
content_list_data | The dictionary to parse. |
Returns:
The parsed content list.
parse_chat_completion_choice
Parse chat completion choice from a dictionary.
Arguments:
Name | Description |
---|---|
messages_data | The dictionary to parse. |
Returns:
The parsed chat completion choice.
parse_choice
Parse choice from a dictionary.
Arguments:
Name | Description |
---|---|
choice_data | The dictionary to parse. |
Returns:
The parsed choice.
parse_usage
Parse usage from a dictionary.
Arguments:
Name | Description |
---|---|
usage_data | The dictionary to parse. |
Returns:
The parsed usage.
parse_generation_error
Parse generation error from a dictionary.
Arguments:
Name | Description |
---|---|
error_data | The dictionary to parse. |
Returns:
The parsed generation error.
default_json_serializer
Default JSON serializer for objects.
Arguments:
Name | Description |
---|---|
o | The object to serialize. |
Returns:
The serialized object.
parse_result
Parse result from a dictionary.
Arguments:
Name | Description |
---|---|
data | The dictionary to parse. |
Returns:
The parsed result.
parse_message
Parse message from a dictionary.
Arguments:
Name | Description |
---|---|
message | The dictionary to parse. |
Returns:
The parsed message.
parse_messages
Parse messages from a list.
Arguments:
Name | Description |
---|---|
messages | The list to parse. |
Returns:
The parsed messages.
parse_model_parameters
Parse model parameters from a dictionary.
Arguments:
Name | Description |
---|---|
parameters | The dictionary to parse. |
Returns:
The parsed model parameters.