We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3f0ac0 commit d090667Copy full SHA for d090667
src/providers/bedrock/embed.ts
@@ -52,9 +52,10 @@ export const BedrockCohereEmbedConfig: ProviderConfig = {
52
encoding_format: {
53
param: 'embedding_types',
54
required: false,
55
- transform: (params: any): string[] => {
+ transform: (params: any): string[] | undefined => {
56
if (Array.isArray(params.encoding_format)) return params.encoding_format;
57
- return [params.encoding_format];
+ else if (typeof params.encoding_format === 'string')
58
+ return [params.encoding_format];
59
},
60
61
};
0 commit comments