[Python] Valid config keys have changed in V2: * 'fields' has been removed

Discussão em 'Python' iniciado por Stack, Janeiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    Does anyone know how to resolve the following warning

    UserWarning: Valid config keys have changed in V2:
    * 'fields' has been removed
    warnings.warn(message, UserWarning)


    The code:

    from smolagents import CodeAgent, HfApiModel

    agent = CodeAgent(tools=[], model=HfApiModel())
    while True:
    user_input = input("You: ")
    if user_input.lower() == "exit":
    print("Goodbye!")
    break
    try:
    response = agent.provide_final_answer(user_input)
    print(f"Assistant: {response}")
    except Exception as e:
    print(f"An error occurred: {e}")


    I want to ignore it or fix this warning. I tried to ignore it but not working

    Continue reading...

Compartilhe esta Página