Spaces:
Sleeping
Sleeping
sync
Browse filesFiles changed (2)
- README.md+2-2
- hf_agent.py+3-3
60 unmodified lines6162636464656667263 unmodified lines33133233333433433533633760 unmodified lines- **Framework**: Smolagents CodeAgent with custom tools- **Default Strategy**: Remote (HuggingFace Serverless Inference API)- **Access**: NO approval required - all models are openly accessible- **API Endpoint**: `https://api-inference.huggingface.co` - FORCED to HuggingFace only, no external providers- **API Endpoint**: `https://router.huggingface.co/hf-inference` - FORCED to HuggingFace infrastructure only (no external providers)
### Tools1. **Web Search Tool**: DuckDuckGo-based real-time information retrieval263 unmodified lines- **Fallback:** `HuggingFaceH4/zephyr-7b-beta` (MIT license, ungated, no approval needed)- **Embedding:** `sentence-transformers/all-MiniLM-L6-v2` (ungated)- **Default:** Remote strategy (HuggingFace Serverless Inference API)- **API Endpoint:** Hardcoded to `https://api-inference.huggingface.co` - prevents external provider routing- **API Endpoint:** Hardcoded to `https://router.huggingface.co/hf-inference` - routes to HuggingFace infrastructure only
#### Benefits- Uses latest high-performance ungated models558 unmodified lines55956056156256256356456521 unmodified lines5875885895905905915925936 unmodified lines600601602603603604605606558 unmodified lines else: # Use remote model with InferenceClientModel (HuggingFace) from huggingface_hub import InferenceClient model_url = f"https://api-inference.huggingface.co/models/{self.model_config['llm_model']}" model_url = f"https://router.huggingface.co/hf-inference/models/{self.model_config['llm_model']}" hf_client = InferenceClient( base_url=model_url, token=get_hf_token()21 unmodified lines else: print("Local fallback not available, using remote fallback...") from huggingface_hub import InferenceClient model_url = f"https://api-inference.huggingface.co/models/{self.model_config['fallback_model']}" model_url = f"https://router.huggingface.co/hf-inference/models/{self.model_config['fallback_model']}" hf_client = InferenceClient( base_url=model_url, token=get_hf_token()6 unmodified lines
else: from huggingface_hub import InferenceClient model_url = f"https://api-inference.huggingface.co/models/{self.model_config['fallback_model']}" model_url = f"https://router.huggingface.co/hf-inference/models/{self.model_config['fallback_model']}" hf_client = InferenceClient( base_url=model_url, token=get_hf_token()README.md+2-2
hf_agent.py+3-3