Skip to content

Commit 60f488c

Browse files
committed
fix llm input w img
1 parent fa9cbaf commit 60f488c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/inferencesh/sdk.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,16 @@ class LLMInput(BaseAppInput):
345345
)
346346

347347
class LLMInputWithImage(LLMInput):
348+
context: list[ContextMessageWithImage] = Field(
349+
description="The context to use for the model",
350+
examples=[
351+
[
352+
{"role": "user", "content": [{"type": "text", "text": "What is the capital of France?"}, {"type": "image", "url": "https://example.com/image.jpg"}]},
353+
{"role": "assistant", "content": [{"type": "text", "text": "The capital of France is Paris."}]}
354+
],
355+
],
356+
default=[]
357+
)
348358
image: Optional[File] = Field(
349359
description="The image to use for the model",
350360
default=None

0 commit comments

Comments
 (0)