Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verbose impacts LLMfx output on 0.2.2 #439

Open
carlos-martins-rlabs opened this issue Feb 19, 2024 · 0 comments
Open

Verbose impacts LLMfx output on 0.2.2 #439

carlos-martins-rlabs opened this issue Feb 19, 2024 · 0 comments

Comments

@carlos-martins-rlabs
Copy link

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}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant