from smolai import SmolAgent from langchain.chat_models import ChatOpenAI # Initialize SmolAgents farmer_agent = SmolAgent( name="FarmerAgent", description="Handles farmer registrations and crop listings.", llm=ChatOpenAI(temperature=0.7) ) marketplace_agent = SmolAgent( name="MarketplaceAgent", description="Assists customers in searching for crops and making recommendations.", llm=ChatOpenAI(temperature=0.7) ) health_agent = SmolAgent( name="HealthAgent", description="Provides health benefits of various crops to customers.", llm=ChatOpenAI(temperature=0.7) ) farming_advisor_agent = SmolAgent( name="FarmingAdvisorAgent", description="Gives farming tips and advice based on queries.", llm=ChatOpenAI(temperature=0.7) ) # Function to interact with agents def interact_with_agent(agent, user_input): response = agent.chat(user_input) return response