Only tool relevant tests

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2024-09-30 22:24:20 +02:00
parent 8082b3651a
commit b430d318bb

View File

@@ -6,24 +6,24 @@ from textwrap import dedent
from langchain_core.messages import HumanMessage, SystemMessage, ToolMessage, AIMessage from langchain_core.messages import HumanMessage, SystemMessage, ToolMessage, AIMessage
tests = { tests = {
607: Test( # 607: Test(
name="Healthy Vegetables in Chinese", # name="Healthy Vegetables in Chinese",
runnable=basic_prompt, # runnable=basic_prompt,
runnable_input={ # runnable_input={
"system_msg": "You are a helpful assistant. You serve people across the globe.", # "system_msg": "You are a helpful assistant. You serve people across the globe.",
"human_msg": "什么蔬菜最健康?", # "human_msg": "什么蔬菜最健康?",
}, # },
validator=system_human_answer_match, # validator=system_human_answer_match,
validation_input={ # validation_input={
"criteria": dedent("""- in Mandarin Chinese from front to finnish # "criteria": dedent("""- in Mandarin Chinese from front to finnish
- factually correct # - factually correct
- about healthy vegetables # - about healthy vegetables
- just one single conversational answer, without any AI fragments (A/B versions, "end of message" parts, unfitting discalimers or notes) # - just one single conversational answer, without any AI fragments (A/B versions, "end of message" parts, unfitting discalimers or notes)
Again, the message has to be entirely in Manadarin Chineese. # Again, the message has to be entirely in Manadarin Chineese.
That means If the answer is not in Chinese the answer is NOT correct! Only if the message in in Chinese rate as correct"""), # That means If the answer is not in Chinese the answer is NOT correct! Only if the message in in Chinese rate as correct"""),
}, # },
), # ),
693: Test( 693: Test(
name="Simple Multiplication", name="Simple Multiplication",
runnable=one_tool_call_answer, runnable=one_tool_call_answer,