MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / is_present

Function is_present

examples/server/api_like_OAI.py:26–33  ·  view source on GitHub ↗
(json, key)

Source from the content-addressed store, hash-verified

24args = parser.parse_args()
25
26def is_present(json, key):
27 try:
28 buf = json[key]
29 except KeyError:
30 return False
31 if json[key] == None:
32 return False
33 return True
34
35#convert chat to prompt
36def convert_chat(messages):

Callers 3

make_postDataFunction · 0.85
chat_completionsFunction · 0.85
completionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected