Skip to content
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

typescript fail #1016

Open
1 task done
orr-levinger-zets opened this issue Aug 28, 2024 · 1 comment
Open
1 task done

typescript fail #1016

orr-levinger-zets opened this issue Aug 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@orr-levinger-zets
Copy link

Confirm this is a Node library issue and not an underlying OpenAI API issue

  • This is an issue with the Node library

Describe the bug

error TS2345: Argument of type 'BlobPart[]' is not assignable to parameter of type '(Blob | BinaryLike)[]'.
Type 'BlobPart' is not assignable to type 'Blob | BinaryLike'.
Type 'ArrayBuffer' is not assignable to type 'Blob | BinaryLike'.
Type 'ArrayBuffer' is missing the following properties from type 'Float64Array': BYTES_PER_ELEMENT, buffer, byteOffset, copyWithin, and 24 more.

131 return new File(bits, name, options);
~~~~

Found 1 error in node_modules/.pnpm/[email protected]/node_modules/openai/src/uploads.ts:131

To Reproduce

use pnpm to install the lib
use it in any ts file
run npx tsc

versions:
typescript: 4.9.5
node: v20.7.0
pnpm: 7.33.4

Code snippets

{
  "name": "@zest/common-openai",
  "version": "1.0.0",
  "description": "Common openai",
  "scripts": {
    "test": "jest",
    "test:watch": "jest --watch",
    "test:watch:all": "jest --watchAll",
    "tsc:ci": "tsc --noEmit",
    "debug": "node --inspect-brk node_modules/.bin/jest --runInBand"
  },
  "author": "env0",
  "license": "MIT",
  "main": "index.ts",
  "private": true,
  "dependencies": {
    "openai": "4.56.0"
  }
}

OS

14.1 (23B2073)

Node version

v20.7.0

Library version

4.56.0

@orr-levinger-zets orr-levinger-zets added the bug Something isn't working label Aug 28, 2024
@RobertCraigie
Copy link
Collaborator

RobertCraigie commented Sep 3, 2024

Thanks for the report, can you share your tsconfig as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants