-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Deprecate Multi Modal LLMs #19115
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
base: main
Are you sure you want to change the base?
Deprecate Multi Modal LLMs #19115
Conversation
llama-index-core/llama_index/core/evaluation/multi_modal/faithfulness.py
Show resolved
Hide resolved
...l_llms/llama-index-multi-modal-llms-anthropic/llama_index/multi_modal_llms/anthropic/base.py
Outdated
Show resolved
Hide resolved
...i_modal_llms/llama-index-multi-modal-llms-nvidia/llama_index/multi_modal_llms/nvidia/base.py
Outdated
Show resolved
Hide resolved
…recation messages
@@ -116,20 +116,23 @@ def __call__( | |||
async def acall( | |||
self, | |||
llm_kwargs: Optional[Dict[str, Any]] = None, | |||
image_documents: Optional[List[ImageNode]] = None, | |||
image_documents: Optional[List[ImageBlock]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably continue to handle passing in ImageNode
here and just translate it to ImageBlock
@@ -130,19 +130,22 @@ def evaluate( | |||
context_str=context_str, query_str=evaluation_query_str | |||
) | |||
|
|||
image_nodes: List[Any] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slightly misleading name (and if we can avoid typing things as Any
, that'd be good too)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This pops up in a few places)
for image_node in image_nodes | ||
if isinstance(image_node.node, ImageNode) | ||
], | ||
image_documents: List[Any] = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make the variable name and typing here better
@@ -192,154 +184,165 @@ def _get_response_token_counts(self, raw_response: Any) -> dict: | |||
} | |||
|
|||
def _complete( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for complete and stream_complete, I think we can just translate into message dicts, call chat, and convert the chat response to completion response?
There are a few utils for doing this in core that other LLMs use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems pretty good! And holy a huge amount of work, thanks for tackling this
I think there is just some nits on core and maybe anthropic, but otherwise, looks great!
Description
Deprecate Multi Modal LLMs in favor of multi modal support of their sibling LLM classes.