Skip to content

Commit 691fe8e

Browse files
committed
Minor fix
1 parent 50ed42a commit 691fe8e

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## 0.0.48
2-
*INCOMPLETE*
2+
+ Fixed `muna.predictions.create` error when an input value is a `boolean`, `boolean[]` or `BoolArray`.
33

44
## 0.0.47
55
+ Added `muna.beta.chat.completions.create` method to create chat completions mirroring the OpenAI client.

src/types/value.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,17 @@ export type Dtype =
3535
*/
3636
export class BoolArray extends Uint8Array {
3737

38-
constructor (values: ArrayBuffer | boolean[]) {
38+
constructor(values: ArrayBuffer | boolean[]) {
3939
super(Array.isArray(values) ? values.map(v => +v) : values);
4040
}
4141
}
4242

43+
Object.defineProperty(
44+
BoolArray,
45+
"name",
46+
{ value: "BoolArray", writable: false }
47+
);
48+
4349
/**
4450
* A `TypedArray` instance.
4551
*/

0 commit comments

Comments
 (0)