llama-stack-mirror/llama_stack
Kevin Postlethwait a57985eeac
fix: add check for interleavedContent (#1973)
# What does this PR do?
Checks for RAGDocument of type InterleavedContent

I noticed when stepping through the code that the supported types for
`RAGDocument` included `InterleavedContent` as a content type. This type
is not checked against before putting the `doc.content` is regex matched
against. This would cause a runtime error. This change adds an explicit
check for type.

The only other part that I'm unclear on is how to handle the
`ImageContent` type since this would always just return `<image>` which
seems like an undesired behavior. Should the `InterleavedContent` type
be removed from `RAGDocument` and replaced with `URI | str`?

## Test Plan


[//]: # (## Documentation)

---------

Signed-off-by: Kevin <kpostlet@redhat.com>
2025-05-06 09:55:07 -07:00
..
apis chore: more mypy fixes (#2029) 2025-05-06 09:52:31 -07:00
cli chore: more mypy fixes (#2029) 2025-05-06 09:52:31 -07:00
distribution chore: more mypy fixes (#2029) 2025-05-06 09:52:31 -07:00
models chore: more mypy fixes (#2029) 2025-05-06 09:52:31 -07:00
providers fix: add check for interleavedContent (#1973) 2025-05-06 09:55:07 -07:00
strong_typing chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
templates fix: remove code interpeter implementation (#2087) 2025-05-01 14:35:08 -07:00
__init__.py export LibraryClient 2024-12-13 12:08:00 -08:00
env.py refactor(test): move tools, evals, datasetio, scoring and post training tests (#1401) 2025-03-04 14:53:47 -08:00
log.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
schema_utils.py chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00