I am trying to get to use the web search tools in an Agent but it is giving the response without using the tools.
more details
from phi.agent import Agent
from phi.model.openai.like import OpenAILike
from phi.tools.duckduckgo import DuckDuckGo
from phi.tools.googlesearch import GoogleSearch
import os
from dotenv import load_dotenv
load_dotenv()
web_agent = Agent(
name="Web Agent",
model=OpenAILike(
id="turboderp_Mixtral-8x7B-instruct-exl2",
api_key=os.getenv("API_KEY"),
base_url="http://lme49.cs.fau.de:5000/v1",
),
tools=[GoogleSearch()],
instructions=["Always include sources"],
show_tool_calls=True,
markdown=True,
debug_mode=True,
)
web_agent.print_response("Whats happening in France?")
DEBUG Debug logs enabled
DEBUG *********** Agent Run Start: a93a8f81-b702-439e-a896-ffc4ca781e5c ***********
DEBUG Function google_search from googlesearch added to model.
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== system ==============
DEBUG ## Instructions
- Always include sources
- Use markdown to format your answers.
DEBUG ============== user ==============
DEBUG Whats happening in France?
DEBUG ============== assistant ==============
DEBUG As of my last update in October 2023, I don't have real-time access to current events. However, France, like any country, is
continually experiencing a range of political, economic, social, and cultural developments. To get the most up-to-date
information, you can refer to reliable news sources such as:
- [BBC News - France](https://www.bbc.com/news/world/europe/france)
- [The Guardian - France](https://www.theguardian.com/world/france)
- [Le Monde](https://www.lemonde.fr/) (in French)
- [France 24](https://www.france24.com/)
These sources provide comprehensive coverage of current events in France, including political news, economic developments, and
social issues.
DEBUG **************** METRICS START ****************
DEBUG * Time to generate response: 10.3647s
DEBUG * Tokens per second: 18.3314 tokens/s
DEBUG * Input tokens: 29
DEBUG * Output tokens: 190
DEBUG * Total tokens: 219
DEBUG **************** METRICS END ******************
DEBUG ---------- OpenAI Response End ----------
DEBUG Added 2 Messages to AgentMemory
DEBUG Added AgentRun to AgentMemory
DEBUG --**-- Logging Agent Run
DEBUG *********** Agent Run End: a93a8f81-b702-439e-a896-ffc4ca781e5c ***********
ββ Message βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Whats happening in France? β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
ββ Response (11.0s) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β As of my last update in October 2023, I don't have real-time access to current events. However, France, like any country, is β
β continually experiencing a range of political, economic, social, and cultural developments. To get the most up-to-date information, β
β you can refer to reliable news sources such as: β
β β
β β’ BBC News - France β
β β’ The Guardian - France β
β β’ Le Monde (in French) β
β β’ France 24 β
β β
β These sources provide comprehensive coverage of current events in France, including political news, economic developments, and β
β social issues. β
β β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
I have tried with the DuckDuckGo tool and as well as the Newspaper4k but it is always giving the response without using the websearch. I am using a custom LLM endpoint and the model is working as shown in the output. But it is not using the web search tool.