Skip to content

Sending PDF files using the $builder->with_file() method is not working. #165

@Arkenon

Description

@Arkenon

In a message I posted to the core-ai Slack channel, I wrote:

"Does wp-ai-client support .pdf files via the $builder->with_file( $file_path, $mime_type) method?
When I try this, I get the following message: "No models were found that support text rendering for this request."
Thanks in advance for your help."

In response, @JasonTheAdams posted the change he made here:

437d0d9

To test it, I manually added the following code snippets to the OpenAiModelMetadataDirectory and GoogleModelMetadataDirectory files.

[ModalityEnum::text(), ModalityEnum::document()],
[ModalityEnum::text(), ModalityEnum::image(), ModalityEnum::document()],

The "Model not found..." error no longer occurs. However, the error "Unsupported MIME type for inline file message section: "application/pdf" is returned now.

I think a general adjustment regarding file processing is needed.

Here is the Github repo of my project: https://github.com/Arkenon/orchestrator-for-wp-ai-client

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions