| 406 | captured = {} |
| 407 | |
| 408 | class FakeInferenceClient: |
| 409 | def __init__(self, model=None, provider=None, api_key=None, timeout=None, **kwargs): |
| 410 | captured["model"] = model |
| 411 | captured["provider"] = provider |
| 412 | captured["api_key"] = api_key |
| 413 | captured["timeout"] = timeout |
| 414 | |
| 415 | def feature_extraction(self, text, model=None): |
| 416 | captured["text"] = text |
| 417 | captured["feature_model"] = model |
| 418 | return [0.1, 0.2, 0.3] |
| 419 | |
| 420 | monkeypatch.setenv("HF_TOKEN", "hf_test_token") |
| 421 | monkeypatch.setenv("HF_INFERENCE_PROVIDER", "auto") |
nothing calls this directly
no outgoing calls
no test coverage detected