mellea.helpers.openai_compatible_helpers
A file for helper functions that deal with OpenAI API compatible helpers.
Functions
extract_model_tool_requests
chat_completion_delta_merge
ChatCompletionChunk
s and merges them into a single dict representing the ChatCompletion
choice.
Args:
chunks
: the list of dicts that represent the message deltasforce_all_tool_calls_separate
: ifTrue
, tool calls in separate message deltas will not be merged (even if their index values are the same); use when providers do not return the correct index value for tool calls. If using this option, all tool calls must be fully populated in a single delta since they won’t be merged.