Skip to content

Commit

Permalink
go back to any
Browse files Browse the repository at this point in the history
  • Loading branch information
odilitime committed Feb 27, 2025
1 parent a4faa64 commit 6ae8c89
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/core/src/generation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2316,21 +2316,20 @@ async function handleOpenAI({
modelOptions,
provider,
runtime,
}: ProviderOptions): Promise<GenerateObjectResult<unknown>> {
}: ProviderOptions): Promise<GenerateObjectResult<any>> {
const endpoint =
runtime.character.modelEndpointOverride || getEndpoint(provider);
const baseURL =
getCloudflareGatewayBaseURL(runtime, "openai") || endpoint;
const openai = createOpenAI({ apiKey, baseURL });
const prom = aiGenerateObject({
model: openai.languageModel(model) as any,
return aiGenerateObject({
model: openai.languageModel(model),
schema,
schemaName,
schemaDescription,
mode,
...modelOptions,
});
return prom as any as Promise<GenerateObjectResult<unknown>>;
}

/**
Expand Down

0 comments on commit 6ae8c89

Please sign in to comment.