feat(core): Multimodal synthesis part 2#21561
feat(core): Multimodal synthesis part 2#21561bschloss wants to merge 1 commit intorun-llama:mainfrom
Conversation
| [f"Response {index + 1}: {item}" for index, item in enumerate(responses)] | ||
| ) | ||
|
|
||
| def _make_prompt_kwargs(self, chunk: str | ChatMessage) -> dict[str, Any]: |
There was a problem hiding this comment.
This function was moved and changed. Apologies for making the diff hard to read. Changes are mostly frontloaded to handle multiple templates/prompt helpers.
| return self.get_response( | ||
| query_str=query_str, text_chunks=summaries, **response_kwargs | ||
| ) | ||
|
|
There was a problem hiding this comment.
There is a significant amount of code duplication here. Could create an abstraction similar to some other classes. Up to you all.
| "information2", | ||
| ] | ||
|
|
||
| def test_synthesize__multimodal( |
There was a problem hiding this comment.
This was simply moved. No logical changes. Also removed some unnecessary comments and standardized style.
There was a problem hiding this comment.
Just standardizing style/cleanup. No logical changes.
There was a problem hiding this comment.
No logical changes. Standardized style/did some clean up
There was a problem hiding this comment.
No logical changes. Moved a function and standardized style.
There was a problem hiding this comment.
Longer test file, but this class has some complex parametrization and uses programs, so wanted to do some thorough testing. Definitely open to suggestions on reducing code.
Description
Follow up PR to #21374. Implements multimodal synthesis for the remaining synthesizers.
Fixes # #21373
New Package?
Did I fill in the
tool.llamahubsection in thepyproject.tomland provide a detailed README.md for my new integration or package?Version Bump?
Did I bump the version in the
pyproject.tomlfile of the package I am updating? (Except for thellama-index-corepackage)Type of Change
Please delete options that are not relevant.
How Has This Been Tested?
Your pull-request will likely not be merged unless it is covered by some form of impactful unit testing.
Suggested Checklist:
uv run make format; uv run make lintto appease the lint gods