File size: 773 Bytes
1f7d1c0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# ββ mcp/protocols.py βββββββββββββββββββββββββββββββββββββββββββββββββββ
import asyncio
from mcp.openai_utils import ai_qa
from mcp.gemini import gemini_qa
async def draft_protocol(question: str, context: str, llm: str = "openai") -> str:
"""
Draft a detailed experimental protocol for a given hypothesis/question.
"""
if llm.lower() == "gemini":
qa_fn = gemini_qa
else:
qa_fn = ai_qa
prompt = (
"You are a senior researcher. Draft a step-by-step experimental protocol to test: "
f"{question}\nContext:\n{context}\nInclude materials, methods, controls, expected outcomes."
)
return await qa_fn(prompt) |