Skip to content

Commit 4384a93

Browse files
committed
fix: type errors raised due to multimodal embeddings type
1 parent 8ec5788 commit 4384a93

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/providers/ai21/embed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const AI21EmbedConfig: ProviderConfig = {
1111
required: true,
1212
transform: (params: EmbedParams): string[] => {
1313
if (Array.isArray(params.input)) {
14-
return params.input;
14+
return params.input as string[];
1515
} else {
1616
return [params.input];
1717
}

src/providers/cohere/embed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const CohereEmbedConfig: ProviderConfig = {
99
required: true,
1010
transform: (params: EmbedParams): string[] => {
1111
if (Array.isArray(params.input)) {
12-
return params.input;
12+
return params.input as string[];
1313
} else {
1414
return [params.input];
1515
}

src/providers/workers-ai/embed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const WorkersAiEmbedConfig: ProviderConfig = {
1313
required: true,
1414
transform: (params: EmbedParams): string[] => {
1515
if (Array.isArray(params.input)) {
16-
return params.input;
16+
return params.input as string[];
1717
} else {
1818
return [params.input];
1919
}

0 commit comments

Comments
 (0)