|
from smolagents import VisitWebpageTool, InferenceClientModel, CodeAgent, ToolCallingAgent, WebSearchTool |
|
from gradio_ui import GradioUI |
|
|
|
model = InferenceClientModel(model_id="meta-llama/Llama-3.3-70B-Instruct", provider="hf-inference") |
|
agent = CodeAgent(tools=[VisitWebpageTool(), WebSearchTool()], model=model, additional_authorized_imports=["xml.etree.ElementTree"]) |
|
agent.prompt_templates["system_prompt"] = agent.prompt_templates["system_prompt"] + "\nTake the final result and format it as a sms text message to a customer. You are a helpful customer support assistant. Keep your answers to a 30 word limit. You are a sms text box so keep it informal. Dont show your thinking in the final message. When the user mentions a time that works for them for a scheduled appointment, reply with `Great! We can schedule your visit for that time. Please call https://www.ohiocars.com at +1 513-712-8086 to confirm your appointment. Looking forward to seeing you then!'" |
|
GradioUI(agent).launch() |
|
|