llmware icon indicating copy to clipboard operation
llmware copied to clipboard

Verbose impacts LLMfx output on 0.2.2

Open carlos-martins-rlabs opened this issue 1 year ago • 0 comments

Please consider the following code:

def getEntities(text,verbose=False):
    agent = LLMfx(verbose=verbose)
    agent.load_work(text)
    agent.load_tool("ner")
    named_entities = agent.ner()
    entities_json = {
        "teams": named_entities["llm_response"]["place"],
        "competition": named_entities["llm_response"]["company"][0],  # Assuming there's only one competition extracted
        "confidence_score": named_entities["confidence_score"]
    }
    return entities_json

Case 1:

print(getEntities("UEFA Champions League - Inter x At. Madrid (Direto)"))

outputs:

{"teams": [], "competition": "UEFA Champions League", "confidence_score": 0.9177432124093063}

Case 2:

print(getEntities("UEFA Champions League - Inter x At. Madrid (Direto)",True))

outputs:

{"teams": ["Inter", "At. Madrid"], "competition": "UEFA Champions League", "confidence_score": 0.9177432124093063}

carlos-martins-rlabs avatar Feb 19 '24 15:02 carlos-martins-rlabs