Skip to content

llm-tool / VLMEval does not build prompt correctly when used with images/video #270

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

Closed
davidkoski opened this issue Apr 15, 2025 · 0 comments
Assignees

Comments

@davidkoski
Copy link
Collaborator

In LLMTool.swift it doesn't build the prompt correctly when there are images or video:

        let messages: [[String: Any]] =
            if !images.isEmpty || !videos.isEmpty {
                [
                    [
                        "role": "user",
                        "content": [
                            [
                                "type": "text",
                                "text": generate.system,
                            ]
                        ]

It looks like this was inadvertently added in #206 -- it needs to include the use prompt. I think this should probably generate two dictionaries and this first one should be role: system.

I think we can fix this in #257

@davidkoski davidkoski self-assigned this Apr 15, 2025
davidkoski added a commit to ibrahimcetin/mlx-swift-examples that referenced this issue Apr 17, 2025
davidkoski added a commit to ibrahimcetin/mlx-swift-examples that referenced this issue Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant