Skip to content

Invalid file for Batch API. Must be utf-8 encoded #19

Description

@lorenz1974

When I try to use Add-OpeAIFile with the purpuse "batch" like this for example:

$upload = Add-OpenAIFile -File $file.FullName -Purpose "batch"

I receive this error:

Invoke-OpenAIAPIRequest: C:\Program Files\WindowsPowerShell\Modules\PSOpenAI\3.14.0\Public\Files\Add-OpenAIFile.ps1:95:21
Line |
  95 |          $Response = Invoke-OpenAIAPIRequest @params
     |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | OpenAI API returned an 400 (Bad Request) Error: Invalid file for Batch API. Must be utf-8 encoded

Any suggestions?
Many thanks!

L.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions