Closed Karbashevskyi closed 2 months ago
Thanks for the report, could you share your tsconfig.json
?
/* To learn more about this file see: https://angular.io/config/tsconfig. */ {
"compileOnSave": false,
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": false,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": [
"ES2022",
"dom"
],
"paths": {
"@src/*": [
"./src/*"
],
"@environments/*": [
"./src/environments/*"
],
"@assets/*": [
"./src/assets/*"
]
},
"plugins": [
{
"transform": "typia/lib/transform"
}
],
"strictNullChecks": true
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
Thanks @Karbashevskyi! I can't reproduce the error you were seeing but we drastically changed how the partial json parser works in v4.61.0
, please try it out and let me know if it's fixed now!
@RobertCraigie this issue is not present in 4.61.0, I tried to run the project again with the 4.60.0 package to make sure it was only a problem with this version and it was indeed. Looks like you can close this issue. Thanks!
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
I encountered a TypeScript error (TS7029: Fallthrough case in switch) while working with the OpenAI Node.js client. The error is due to a missing break statement in the switch method at parser.ts line 184. Specifically, the case for 'number' does not have a break, causing a fallthrough to subsequent cases.
To Reproduce
Code snippets
No response
OS
macOS
Node version
Node v20.11.1
Library version
openai v4.60.0