Update gaia_agent.py
Browse files7 unmodified lines891011121314151 unmodified lines16616716816917017117217317417517622 unmodified lines1992002011962022032042057 unmodified linesfrom langchain_community.document_loaders import ArxivLoaderfrom langchain_core.tools import toolfrom langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFacefrom langchain_xai import ChatXAIfrom math import sqrt
### =============== MATHEMATICAL TOOLS =============== ###151 unmodified lines )
chat = ChatHuggingFace(llm=llm, verbose=True) elif provider == "xai": chat = ChatXAI( model="grok-3-latest", temperature=0, ) else: raise ValueError("Invalid provider. Choose 'ollama' or 'huggingface'.") # Bind tools to LLM22 unmodified linesif __name__ == "__main__": question = "Examine the video at https://www.youtube.com/watch?v=1htKBjuUWec.\n\nWhat does Teal'c say in response to the question \"Isn't that hot?\"" # fixed_answer = "extremely" graph = build_graph(provider="huggingface") graph = build_graph(provider="xai") messages = [HumanMessage(content=question)] messages = graph.invoke({"messages": messages}) for m in messages["messages"]:gaia_agent.py+7-1