View module source on GitHub

parse_function_call

def parse_function_call(function_call_data)
Parse function call from a dictionary. Arguments:
NameDescription
function_call_dataThe dictionary to parse.
Returns: The parsed function call.

parse_tool_calls

def parse_tool_calls(tool_calls_data)
Parse tool calls from a dictionary. Arguments:
NameDescription
tool_calls_dataThe dictionary to parse.
Returns: The parsed tool calls.

parse_content_list

def parse_content_list(content_list_data)
Parse content list from a dictionary. Arguments:
NameDescription
content_list_dataThe dictionary to parse.
Returns: The parsed content list.

parse_chat_completion_choice

def parse_chat_completion_choice(messages_data)
Parse chat completion choice from a dictionary. Arguments:
NameDescription
messages_dataThe dictionary to parse.
Returns: The parsed chat completion choice.

parse_choice

def parse_choice(choice_data)
Parse choice from a dictionary. Arguments:
NameDescription
choice_dataThe dictionary to parse.
Returns: The parsed choice.

parse_usage

def parse_usage(usage_data)
Parse usage from a dictionary. Arguments:
NameDescription
usage_dataThe dictionary to parse.
Returns: The parsed usage.

parse_generation_error

def parse_generation_error(error_data)
Parse generation error from a dictionary. Arguments:
NameDescription
error_dataThe dictionary to parse.
Returns: The parsed generation error.

default_json_serializer

def default_json_serializer(o: Any) -> Any
Default JSON serializer for objects. Arguments:
NameDescription
oThe object to serialize.
Returns: The serialized object.

parse_result

def parse_result(data: Any) -> Dict[str, Any]
Parse result from a dictionary. Arguments:
NameDescription
dataThe dictionary to parse.
Returns: The parsed result.

parse_message

def parse_message(message: Any) -> Any
Parse message from a dictionary. Arguments:
NameDescription
messageThe dictionary to parse.
Returns: The parsed message.

parse_messages

def parse_messages(messages: List[Any]) -> List[Any]
Parse messages from a list. Arguments:
NameDescription
messagesThe list to parse.
Returns: The parsed messages.

parse_model_parameters

def parse_model_parameters(
        parameters: Optional[Dict[str, Any]]) -> Dict[str, Any]
Parse model parameters from a dictionary. Arguments:
NameDescription
parametersThe dictionary to parse.
Returns: The parsed model parameters.