From dad7af6de15cfb4c3dd8db67da3040c629fd2205 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 18 Jun 2024 18:50:36 -0700 Subject: [PATCH] enh: tool __model__ param support --- backend/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/main.py b/backend/main.py index 147cf77e8..69d91da65 100644 --- a/backend/main.py +++ b/backend/main.py @@ -280,6 +280,13 @@ async def get_function_call_response( "__files__": files, } + if "__model__" in sig.parameters: + # Call the function with the '__model__' parameter included + params = { + **params, + "__model__": model, + } + if "__id__" in sig.parameters: # Call the function with the '__id__' parameter included params = {