From caa8387dd26546d2703b3291d339e8374934b966 Mon Sep 17 00:00:00 2001 From: Hardik Shah Date: Wed, 22 Jan 2025 11:25:10 -0800 Subject: [PATCH] Fix fireworks client sdk chat completion with images (#840) Enable downloads before sending request to fireworks. Test using -- `LLAMA_STACK_CONFIG=./llama_stack/templates/fireworks/run.yaml pytest -s -v -k 'test_image_chat_completion_streaming' tests/client-sdk` --- llama_stack/providers/remote/inference/fireworks/fireworks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llama_stack/providers/remote/inference/fireworks/fireworks.py b/llama_stack/providers/remote/inference/fireworks/fireworks.py index e22144326..5c98d2054 100644 --- a/llama_stack/providers/remote/inference/fireworks/fireworks.py +++ b/llama_stack/providers/remote/inference/fireworks/fireworks.py @@ -265,7 +265,8 @@ class FireworksInferenceAdapter( if isinstance(request, ChatCompletionRequest): if media_present: input_dict["messages"] = [ - await convert_message_to_openai_dict(m) for m in request.messages + await convert_message_to_openai_dict(m, download=True) + for m in request.messages ] else: input_dict["prompt"] = await chat_completion_request_to_prompt(