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]:
333
333
334
334
335
335
def 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 ()
343
337
llm_endpoints = list (
344
338
filter (
345
339
lambda endpoint : endpoint .task and endpoint .task == task_type ,
346
- endpoint_details ,
340
+ endpoints ,
347
341
)
348
342
)
349
343
return llm_endpoints
Original file line number Diff line number Diff line change 51
51
get_llm as get_caii_llm_model ,
52
52
get_embedding_model as get_caii_embedding_model ,
53
53
get_reranking_model as get_caii_reranking_model ,
54
- describe_endpoint ,
54
+ describe_endpoint , get_models_with_task ,
55
55
)
56
56
from ...caii .types import ModelResponse
57
57
from ...caii .utils import get_cml_version_from_sense_bootstrap
@@ -106,7 +106,7 @@ def is_enabled(cls) -> bool:
106
106
return super ().is_enabled ()
107
107
cml_version = Version (version )
108
108
if cml_version >= Version ("2.0.50-b68" ):
109
- available_models = cls . list_llm_models ( )
109
+ available_models = get_models_with_task ( "TEXT_GENERATION" )
110
110
if available_models :
111
111
return True
112
112
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
59
59
# shellcheck disable=SC1090
60
60
source ~ /.bashrc > /dev/null
61
61
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"
67
63
68
64
[ -s " $NVM_DIR /nvm.sh" ] && \. " $NVM_DIR /nvm.sh" > /dev/null # This loads nvm
69
65
You can’t perform that action at this time.
0 commit comments