building of pipeline (validation flaky)

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-08-04 20:50:11 +02:00
parent e56fa9225c
commit 52a180b936
8 changed files with 168 additions and 53 deletions

16
libs/runnables.py Normal file
View File

@@ -0,0 +1,16 @@
from langchain_ollama.chat_models import ChatOllama
from langchain_core.messages import SystemMessage, HumanMessage
from libs.test_class import Test
def basic(model: str, seed: int, test: Test, base_url: str) -> str:
if test.system_msg == None: prompt = [ test.human_msg ]
else: prompt = [ test.system_msg, test.human_msg ]
llm = ChatOllama(
model=model,
seed=seed,
base_url=base_url
)
ai_msg = llm.invoke(prompt)
return ai_msg.content