Upload hf_env/lib/python3.14/site-packages/huggingface_hub/inference/_providers/clarifai.py with huggingface_hub
Browse files
hf_env/lib/python3.14/site-packages/huggingface_hub/inference/_providers/clarifai.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from ._common import BaseConversationalTask
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
_PROVIDER = "clarifai"
|
| 5 |
+
_BASE_URL = "https://api.clarifai.com"
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class ClarifaiConversationalTask(BaseConversationalTask):
|
| 9 |
+
def __init__(self):
|
| 10 |
+
super().__init__(provider=_PROVIDER, base_url=_BASE_URL)
|
| 11 |
+
|
| 12 |
+
def _prepare_route(self, mapped_model: str, api_key: str) -> str:
|
| 13 |
+
return "/v2/ext/openai/v1/chat/completions"
|