MCPcopy Create free account
hub / github.com/microsoft/Webwright / _call_model

Function _call_model

src/webwright/tools/self_reflection.py:223–236  ·  view source on GitHub ↗
(
    *,
    model_client: Any,
    system_prompt: str,
    user_content: list[dict[str, Any]],
    max_new_tokens: int,
)

Source from the content-addressed store, hash-verified

221# ---------------------------------------------------------------------------
222
223def _call_model(
224 *,
225 model_client: Any,
226 system_prompt: str,
227 user_content: list[dict[str, Any]],
228 max_new_tokens: int,
229) -> str:
230 return model_client(
231 [
232 {"role": "system", "content": system_prompt},
233 {"role": "user", "content": user_content},
234 ],
235 max_output_tokens=max_new_tokens,
236 ).strip()
237
238
239def _model_endpoint(model_client: Any) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected