File size: 848 Bytes
c47b2de |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
from txagent import TxAgent
import os
os.environ["MKL_THREADING_LAYER"] = "GNU"
model_name = 'mims-harvard/TxAgent-T1-Llama-3.1-8B'
rag_model_name = 'mims-harvard/ToolRAG-T1-GTE-Qwen2-1.5B'
multiagent = False
max_round = 20
init_rag_num = 0
step_rag_num = 10
agent = TxAgent(model_name,
rag_model_name,
enable_summary=False)
agent.init_model()
question = "Given a 50-year-old patient experiencing severe acute pain and considering the use of the newly approved medication, Journavx, how should the dosage be adjusted considering the presence of moderate hepatic impairment?"
response = agent.run_multistep_agent(
question,
temperature=0.3,
max_new_tokens=1024,
max_token=90240,
call_agent=multiagent,
max_round=max_round)
print(f"\033[94m{response}\033[0m")
|