Skip to content

Commit

Permalink
fix(providers): make options partial
Browse files Browse the repository at this point in the history
  • Loading branch information
kwaa committed Dec 18, 2024
1 parent 8eaa7a5 commit 7507a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/providers/src/types/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CommonRequestOptions } from '@xsai/shared'
/** T: required apiKey */
export type ProviderOptions<T extends boolean = false> =
T extends true
? Omit<ProviderResult, 'apiKey'> & Required<Pick<ProviderResult, 'apiKey'>>
? Partial<Omit<ProviderResult, 'apiKey'>> & Required<Pick<ProviderResult, 'apiKey'>>
: Partial<ProviderResult>

export type ProviderResult = Omit<CommonRequestOptions, 'model'> & Partial<Pick<CommonRequestOptions, 'model'>>
Expand Down

0 comments on commit 7507a99

Please sign in to comment.