Commit edfae8d

benny-dou <60535774+benny-dou@users.noreply.github.com>
2026-05-15 06:25:10
chore(ai): change default media send method to base64
1 parent fecf37f
Changed files (2)
src/ai/texts/contexts.py
@@ -179,7 +179,7 @@ async def single_openai_response_context(client: Client, message: Message, opena
         info = parse_msg(msg, silent=True)
         sender = info["fwd_full_name"] or info["full_name"]
         media_path = DOWNLOAD_DIR + "/" + info["file_name"]
-        media_send_as = openai_params.get("openai_media_send_as", "file_id")
+        media_send_as = openai_params.get("openai_media_send_as", "base64")
         file_id = ""
         try:
             if info["mtype"] == "photo":
src/ai/texts/openai_response.py
@@ -38,7 +38,7 @@ async def openai_responses_api(
     openai_allow_image: bool = False,  # whether to allow image in input modalities
     openai_allow_video: bool = False,  # whether to allow video in input modalities
     openai_allow_file: bool = False,  # whether to allow file in input modalities
-    openai_media_send_as: Literal["base64", "file_id"] = "file_id",
+    openai_media_send_as: Literal["base64", "file_id"] = "base64",
     skills: str = "",
     openai_append_tool_results: bool = True,
     hide_thinking: bool = False,