Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update URL import, URL -> ImageContentItemImageURL #1204

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

mattf
Copy link
Contributor

@mattf mattf commented Feb 21, 2025

What does this PR do?

fixes test to use new name for URL import

Test Plan

LLAMA_STACK_BASE_URL=http://localhost:8321 pytest -v tests/client-sdk/inference/test_embedding.py --embedding-model baai/bge-m3

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 21, 2025
@mattf
Copy link
Contributor Author

mattf commented Feb 21, 2025

cc @yanxi0830

@@ -59,7 +59,7 @@
DUMMY_TEXT2 = TextContentItem(text=DUMMY_STRING2, type="text")
# TODO(mf): add a real image URL and base64 string
DUMMY_IMAGE_URL = ImageContentItem(
image=ImageContentItemImage(url=URL(uri="https://example.com/image.jpg")), type="image"
image=ImageContentItemImage(url=ImageContentItemImageURL(uri="https://example.com/image.jpg")), type="image"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is significantly less common to use very strong types in client code. most SDK samples you see (OpenAI's or others) often just use loosely typed dicts (dict(url=dict(uri=...)) or {"url": {"uri": ...} }

@ashwinb ashwinb changed the title update URL import, URL -> ImageContentItemImageURL fix: update URL import, URL -> ImageContentItemImageURL Feb 21, 2025
@ashwinb ashwinb merged commit 3099c52 into meta-llama:main Feb 21, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants