Skip to content

Conversation

@palaniappan-r
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings June 19, 2025 15:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes support for inbuilt tool calling in models and refactors related code accordingly.

  • Explicitly assigns a CPU device fallback in the FAISS vectorstore.
  • Removes the inbuilt_tool_calling parameter from API router and agent instantiations.
  • Renames and refactors the agent method to choose_tools in the RetrieverGraph.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
backend/src/vectorstores/faiss.py Explicitly assigns {"device": "cpu"} when use_cuda is False, ensuring a clear device configuration.
backend/src/prompts/prompt_templates.py Removes the redundant tool_rephrase_prompt_template to simplify the prompt logic.
backend/src/api/routers/graphs.py Removes the inbuilt_tool_calling parameter in line with the PR goal.
backend/src/agents/retriever_graph.py Renames the agent method to choose_tools and removes the inbuilt tool calling branch.
Comments suppressed due to low confidence (2)

backend/src/vectorstores/faiss.py:34

  • Consider adding a comment explaining why 'cpu' is explicitly assigned in the else clause to clarify the intent and improve code readability.
        model_kwargs = {"device": "cuda"} if use_cuda else {"device": "cpu"}

backend/src/agents/retriever_graph.py:123

  • The renaming of the method from 'agent' to 'choose_tools' improves clarity; please ensure that any inline documentation or references to the old name are updated accordingly.
    def choose_tools(self, state: AgentState) -> dict[str, list[str]]:

@palaniappan-r palaniappan-r requested a review from luarss June 19, 2025 15:58
@palaniappan-r palaniappan-r force-pushed the inbuilt-function-calling branch from 5c880f5 to c805f15 Compare June 19, 2025 17:32
@palaniappan-r palaniappan-r changed the title Remove support for models that do not support inbuilt function calling. Fix support for models that do support inbuilt function calling. Jun 19, 2025
Copy link
Collaborator

@luarss luarss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luarss luarss merged commit af5eb30 into master Jun 20, 2025
2 checks passed
@luarss luarss deleted the inbuilt-function-calling branch June 20, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants