mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
add debugging search API
This commit is contained in:
parent
0866068d1c
commit
8d92ea3dc5
1 changed files with 8 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ import orjson
|
|||
from fastapi import APIRouter, Depends, HTTPException, Request, Response
|
||||
from fastapi.responses import ORJSONResponse
|
||||
|
||||
from litellm._logging import verbose_proxy_logger
|
||||
from litellm.proxy._types import *
|
||||
from litellm.proxy.auth.user_api_key_auth import UserAPIKeyAuth, user_api_key_auth
|
||||
from litellm.proxy.common_request_processing import ProxyBaseLLMRequestProcessing
|
||||
|
|
@ -136,6 +137,13 @@ async def search(
|
|||
|
||||
if llm_router is not None and hasattr(llm_router, "search_tools"):
|
||||
search_tool_name_value = data["search_tool_name"]
|
||||
|
||||
verbose_proxy_logger.debug(
|
||||
f"Search endpoint - Looking for search_tool_name: {search_tool_name_value}. "
|
||||
f"Available search tools in router: {[tool.get('search_tool_name') for tool in llm_router.search_tools]}. "
|
||||
f"Total search tools: {len(llm_router.search_tools)}"
|
||||
)
|
||||
|
||||
matching_tools = [
|
||||
tool for tool in llm_router.search_tools
|
||||
if tool.get("search_tool_name") == search_tool_name_value
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue