refac
This commit is contained in:
@@ -2158,6 +2158,9 @@ async def process_chat_payload(request, form_data, user, metadata, model):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if "code_interpreter" in features and features["code_interpreter"]:
|
if "code_interpreter" in features and features["code_interpreter"]:
|
||||||
|
# Skip XML-tag prompt injection when native FC is enabled —
|
||||||
|
# execute_code will be injected as a builtin tool instead
|
||||||
|
if metadata.get("params", {}).get("function_calling") != "native":
|
||||||
form_data["messages"] = add_or_update_user_message(
|
form_data["messages"] = add_or_update_user_message(
|
||||||
(
|
(
|
||||||
request.app.state.config.CODE_INTERPRETER_PROMPT_TEMPLATE
|
request.app.state.config.CODE_INTERPRETER_PROMPT_TEMPLATE
|
||||||
|
|||||||
Reference in New Issue
Block a user