llama-stack/llama_stack/providers/utils
Xi Yan a6c206ea66
[bugfix] fix prompt_adapter interleaved_content_convert_to_raw (#696)
# What does this PR do?

- fix interleaved_content_convert_to_raw in prompt_adapter to correctly
convert ImageContentItem to RawMediaItem with raw data bytes

## Test Plan

```
torchrun $CONDA_PREFIX/bin/pytest -v -s -k "meta_reference" --inference-model="meta-llama/Llama-3.2-11B-Vision-Instruct" ./llama_stack/providers/tests/inference/test_vision_inference.py
```

**Before**
<img width="844" alt="image"
src="https://github.com/user-attachments/assets/f2784b42-2e36-4477-9041-903d5d628a68"
/>


**After**
<img width="836" alt="image"
src="https://github.com/user-attachments/assets/362b6e47-29f7-4119-bcf3-f75db842735f"
/>


## Sources

Please link relevant resources if necessary.


## Before submitting

- [ ] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Ran pre-commit to handle lint / formatting issues.
- [ ] Read the [contributor
guideline](https://github.com/meta-llama/llama-stack/blob/main/CONTRIBUTING.md),
      Pull Request section?
- [ ] Updated relevant documentation.
- [ ] Wrote necessary unit or integration tests.
2024-12-30 16:40:36 -08:00
..
bedrock add missing init file 2024-12-17 11:49:03 -08:00
datasetio Update the "InterleavedTextMedia" type (#635) 2024-12-17 11:18:31 -08:00
inference [bugfix] fix prompt_adapter interleaved_content_convert_to_raw (#696) 2024-12-30 16:40:36 -08:00
kvstore [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
memory [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
scoring [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
telemetry [remove import *] clean up import *'s (#689) 2024-12-27 15:45:44 -08:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00