enh: custom code interpreter prompt

This commit is contained in:
Timothy Jaeryang Baek committed 2025-02-11 21:36:16 -08:00
1 parent 953e408077
commit f916fbba56
5 files changed
+49 -8

No files matched your search

+6 -1
View File
@@ -690,7 +690,12 @@ async def process_chat_payload(request, form_data, metadata, user, model):
if "code_interpreter" in features and features["code_interpreter"]:
form_data["messages"] = add_or_update_user_message(
DEFAULT_CODE_INTERPRETER_PROMPT, form_data["messages"]
(
request.app.state.config.CODE_INTERPRETER_PROMPT_TEMPLATE
if request.app.state.config.CODE_INTERPRETER_PROMPT_TEMPLATE != ""
else DEFAULT_CODE_INTERPRETER_PROMPT
),
form_data["messages"],
)
try: