Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions js/plugins/compat-oai/src/openai/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,13 +244,6 @@ export function openAIPlugin(options?: OpenAIPluginOptions): GenkitPluginV2 {

export type OpenAIPlugin = {
(params?: OpenAIPluginOptions): GenkitPluginV2;
model(
name:
| keyof typeof SUPPORTED_GPT_MODELS
| (`gpt-${string}` & {})
| (`o${number}` & {}),
config?: z.infer<typeof OpenAIChatCompletionConfigSchema>
): ModelReference<typeof OpenAIChatCompletionConfigSchema>;
model(
name:
| keyof typeof SUPPORTED_IMAGE_MODELS
Expand All @@ -272,6 +265,13 @@ export type OpenAIPlugin = {
| (`${string}-transcribe` & {}),
config?: z.infer<typeof TranscriptionConfigSchema>
): ModelReference<typeof TranscriptionConfigSchema>;
model(
name:
| keyof typeof SUPPORTED_GPT_MODELS
| (`gpt-${string}` & {})
| (`o${number}` & {}),
config?: z.infer<typeof OpenAIChatCompletionConfigSchema>
): ModelReference<typeof OpenAIChatCompletionConfigSchema>;
model(name: string, config?: any): ModelReference<z.ZodTypeAny>;
embedder(
name:
Expand Down
2 changes: 1 addition & 1 deletion js/testapps/compat-oai/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ ai.defineFlow(
const { media } = await ai.generate({
model: openAI.model('gpt-4o-mini-tts'),
config: {
voice: 'sage',
voice: 'alloy',
},
prompt: query,
});
Expand Down