Skip to content

Commit

Permalink
Fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mabashian committed Feb 11, 2025
1 parent 9fa396e commit 0ac6b29
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,5 +459,8 @@ class LangchainRoleExplanationPipeline(
def __init__(self, config: LANGCHAIN_PIPELINE_CONFIGURATION):
super().__init__(config=config)

def self_test(self) -> Optional[HealthCheckSummary]:
raise NotImplementedError

def invoke(self, params: RoleExplanationParameters) -> RoleExplanationResponse:
raise NotImplementedError
14 changes: 14 additions & 0 deletions ansible_ai_connect/ai/api/model_pipelines/ollama/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
LangchainMetaData,
LangchainPlaybookExplanationPipeline,
LangchainPlaybookGenerationPipeline,
LangchainRoleExplanationPipeline,
LangchainRoleGenerationPipeline,
)
from ansible_ai_connect.ai.api.model_pipelines.ollama.configuration import (
Expand Down Expand Up @@ -80,6 +81,19 @@ def get_chat_model(self, model_id):
)


@Register(api_type="ollama")
class OllamaRoleExplanationPipeline(LangchainRoleExplanationPipeline[OllamaConfiguration]):

def __init__(self, config: OllamaConfiguration):
super().__init__(config=config)

def get_chat_model(self, model_id):
return OllamaLLM(
base_url=self.config.inference_url,
model=model_id,
)


@Register(api_type="ollama")
class OllamaPlaybookExplanationPipeline(LangchainPlaybookExplanationPipeline[OllamaConfiguration]):

Expand Down

0 comments on commit 0ac6b29

Please sign in to comment.