File tree 2 files changed +17
-0
lines changed
ansible_ai_connect/ai/api/model_pipelines
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -459,5 +459,8 @@ class LangchainRoleExplanationPipeline(
459
459
def __init__ (self , config : LANGCHAIN_PIPELINE_CONFIGURATION ):
460
460
super ().__init__ (config = config )
461
461
462
+ def self_test (self ) -> Optional [HealthCheckSummary ]:
463
+ raise NotImplementedError
464
+
462
465
def invoke (self , params : RoleExplanationParameters ) -> RoleExplanationResponse :
463
466
raise NotImplementedError
Original file line number Diff line number Diff line change 21
21
LangchainMetaData ,
22
22
LangchainPlaybookExplanationPipeline ,
23
23
LangchainPlaybookGenerationPipeline ,
24
+ LangchainRoleExplanationPipeline ,
24
25
LangchainRoleGenerationPipeline ,
25
26
)
26
27
from ansible_ai_connect .ai .api .model_pipelines .ollama .configuration import (
@@ -80,6 +81,19 @@ def get_chat_model(self, model_id):
80
81
)
81
82
82
83
84
+ @Register (api_type = "ollama" )
85
+ class OllamaRoleExplanationPipeline (LangchainRoleExplanationPipeline [OllamaConfiguration ]):
86
+
87
+ def __init__ (self , config : OllamaConfiguration ):
88
+ super ().__init__ (config = config )
89
+
90
+ def get_chat_model (self , model_id ):
91
+ return OllamaLLM (
92
+ base_url = self .config .inference_url ,
93
+ model = model_id ,
94
+ )
95
+
96
+
83
97
@Register (api_type = "ollama" )
84
98
class OllamaPlaybookExplanationPipeline (LangchainPlaybookExplanationPipeline [OllamaConfiguration ]):
85
99
You can’t perform that action at this time.
0 commit comments