MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / call_models

Function call_models

e2e/python/test_inference_routing.py:175–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 spec = datamodel_pb2.SandboxSpec(policy=_baseline_policy())
174
175 def call_models() -> str:
176 import ssl
177 import urllib.request
178
179 ctx = ssl.create_default_context()
180 ctx.check_hostname = False
181 ctx.verify_mode = ssl.CERT_NONE
182
183 req = urllib.request.Request("https://inference.local/v1/models", method="GET")
184 resp = urllib.request.urlopen(req, timeout=30, context=ctx)
185 return resp.read().decode()
186
187 with sandbox(spec=spec, delete_on_exit=True) as sb:
188 result = sb.exec_python(call_models, timeout_seconds=60)

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected