File tree Expand file tree Collapse file tree 1 file changed +0
-19
lines changed
llama_stack/providers/remote/inference/sambanova Expand file tree Collapse file tree 1 file changed +0
-19
lines changed Original file line number Diff line number Diff line change 44# This source code is licensed under the terms described in the LICENSE file in
55# the root directory of this source tree.
66
7- import requests
8-
9- from llama_stack .apis .models import Model
107from llama_stack .log import get_logger
118from llama_stack .providers .utils .inference .litellm_openai_mixin import LiteLLMOpenAIMixin
129
@@ -33,22 +30,6 @@ def __init__(self, config: SambaNovaImplConfig):
3330 json_schema_strict = False , # SambaNova doesn't support strict=True yet
3431 )
3532
36- async def register_model (self , model : Model ) -> Model :
37- model_id = self .get_provider_model_id (model .provider_resource_id )
38-
39- list_models_url = self .config .url + "/models"
40- if len (self .environment_available_models ) == 0 :
41- try :
42- response = requests .get (list_models_url )
43- response .raise_for_status ()
44- except requests .exceptions .RequestException as e :
45- raise RuntimeError (f"Request to { list_models_url } failed" ) from e
46- self .environment_available_models = [model .get ("id" ) for model in response .json ().get ("data" , {})]
47-
48- if model_id .split ("sambanova/" )[- 1 ] not in self .environment_available_models :
49- logger .warning (f"Model { model_id } not available in { list_models_url } " )
50- return model
51-
5233 async def initialize (self ):
5334 await super ().initialize ()
5435
You can’t perform that action at this time.
0 commit comments