Repository navigation
Replies: 1 comment 2 replies
|
@ilvalerione Ideas? I held off on creating a PR until you could review the backwards-compatible approach. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
So, multimodal LLMs support a tool called results with an array of contents, so it's either content as a string, or content as an array of
{type: ....}.My idea is to add support for the tools to return an array of ContentBlocks, maybe return a Message object?! (ignoring id, role, etc), And then at the provider level, it could implement it, to make sure we are backwards compatible, I thought of introducing a new method
getResultAsMessage()that would doif ( result instanceof Message ) return result else new Message(type: text, result...), and rewrite the getResult to extract the text parts of the getResultAsMessage().That way, providers that rely on getResult continue working (with the drawback of not "properly supporting the message mapping"), and the project providers can expose the actual content to the LLM.
All reactions