File tree Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Expand file tree Collapse file tree 3 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -333,17 +333,11 @@ def get_caii_embedding_models() -> List[ModelResponse]:
333333
334334
335335def get_models_with_task (task_type : str ) -> List [Endpoint ]:
336- endpoints : list [ListEndpointEntry ] = list_endpoints ()
337- endpoint_details = list (
338- map (
339- lambda endpoint : describe_endpoint_entry (endpoint .name , endpoints ),
340- endpoints ,
341- )
342- )
336+ endpoints : list [Endpoint ] = list_endpoints ()
343337 llm_endpoints = list (
344338 filter (
345339 lambda endpoint : endpoint .task and endpoint .task == task_type ,
346- endpoint_details ,
340+ endpoints ,
347341 )
348342 )
349343 return llm_endpoints
Original file line number Diff line number Diff line change 5151 get_llm as get_caii_llm_model ,
5252 get_embedding_model as get_caii_embedding_model ,
5353 get_reranking_model as get_caii_reranking_model ,
54- describe_endpoint ,
54+ describe_endpoint , get_models_with_task ,
5555)
5656from ...caii .types import ModelResponse
5757from ...caii .utils import get_cml_version_from_sense_bootstrap
@@ -106,7 +106,7 @@ def is_enabled(cls) -> bool:
106106 return super ().is_enabled ()
107107 cml_version = Version (version )
108108 if cml_version >= Version ("2.0.50-b68" ):
109- available_models = cls . list_llm_models ( )
109+ available_models = get_models_with_task ( "TEXT_GENERATION" )
110110 if available_models :
111111 return True
112112
Original file line number Diff line number Diff line change @@ -59,11 +59,7 @@ wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
5959# shellcheck disable=SC1090
6060source ~ /.bashrc > /dev/null
6161
62- export NVM_DIR=" $HOME /rag-studio/.nvm"
63-
64- if [ -z " $IS_COMPOSABLE " ]; then
65- export NVM_DIR=" $HOME /.nvm"
66- fi
62+ export NVM_DIR=" $HOME /.nvm"
6763
6864[ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh" > /dev/null # This loads nvm
6965
You can’t perform that action at this time.
0 commit comments