MCPcopy Index your code
hub / github.com/going-doer/Paper2Code / api_call

Function api_call

codes/3.1_coding_sh.py:104–116  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

102
103
104def api_call(msg):
105 if "o3-mini" in gpt_version or "o4-mini" in gpt_version:
106 completion = client.chat.completions.create(
107 model=gpt_version,
108 reasoning_effort="high",
109 messages=msg
110 )
111 else:
112 completion = client.chat.completions.create(
113 model=gpt_version,
114 messages=msg
115 )
116 return completion
117
118
119artifact_output_dir=f'{output_dir}/coding_artifacts'

Callers 1

3.1_coding_sh.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected