MCPcopy Create free account
hub / github.com/KnowledgeXLab/LeanRAG / pack_user_ass_to_openai_messages

Function pack_user_ass_to_openai_messages

tools/_utils.py:165–169  ·  view source on GitHub ↗
(*args: str)

Source from the content-addressed store, hash-verified

163
164# it's dirty to type, so it's a good way to have fun
165def pack_user_ass_to_openai_messages(*args: str):
166 roles = ["user", "assistant"]
167 return [
168 {"role": roles[i % 2], "content": content} for i, content in enumerate(args)
169 ]
170
171
172def is_float_regex(value):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected