Merge pull request #2731 from pipecat-ai/pk/update-example-25-to-use-universal-context

Update example 25 to use universal `LLMContext`
This commit is contained in:
Aleix Conchillo Flaqué
2025-09-24 11:05:36 -07:00
committed by GitHub
3 changed files with 51 additions and 56 deletions

View File

@@ -105,6 +105,8 @@ class OpenAILLMAdapter(BaseLLMAdapter[OpenAILLMInvocationParams]):
if item["type"] == "image_url":
if item["image_url"]["url"].startswith("data:image/"):
item["image_url"]["url"] = "data:image/..."
if item["type"] == "input_audio":
item["input_audio"]["data"] = "..."
if "mime_type" in msg and msg["mime_type"].startswith("image/"):
msg["data"] = "..."
msgs.append(msg)