assistant

source

run

def run(
    llm_model: LLMModel,
    temperature: float,
    informal_names: list[str],
    logger: Logger,
) 

Run the LLM assistant to suggest a formal drug name for an informal medicine name

Parameters

llm_model: LLMModel Choice of model to run

temperature: float Temperature to use for generation

informal_names: list[str] The informal names of the medications

logger: Logger The logger to use

Returns

dict or None

A dictionary containing the assistant’s output

  • ‘reply’: str, the formal names suggested by the assistant
  • ‘meta’: dict, metadata from an LLM Generator

Returns None if no informal_name is provided