Skip to content

Commit 761c815

Browse files
committed
Add invoke_params.
1 parent 4c0e37d commit 761c815

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ads/llm/autogen/client_v02.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ def __init__(self, config: dict, **kwargs) -> None:
195195
# Pop the params and use them only for tool calling.
196196
self.function_call_params = config.pop("function_call_params", {})
197197

198+
# If the config specified invoke_params,
199+
# Pop the params and use them only for invoking.
200+
self.invoke_params = config.pop("invoke_params", {})
201+
198202
# Import the LangChain class
199203
if "langchain_cls" not in config:
200204
raise ValueError("Missing langchain_cls in LangChain Model Client config.")
@@ -230,7 +234,7 @@ def create(self, params) -> ModelClient.ModelClientResponseProtocol:
230234
num_of_responses = params.get("n", 1)
231235
messages = params.pop("messages", [])
232236

233-
invoke_params = {}
237+
invoke_params = copy.deepcopy(self.invoke_params)
234238

235239
tools = params.get("tools")
236240
if tools:

0 commit comments

Comments
 (0)