Skip to content

Commit 87981a4

Browse files
committed
add modal for api key
1 parent 3c240da commit 87981a4

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

dashboard/ai-analytics/src/app/api/extract-cost-parameters/route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,13 @@ export async function POST(req: Request) {
186186
`;
187187

188188
const result = await generateObject({
189-
model: openai('gpt-3.5-turbo', { apiKey }),
189+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
190+
model: openai('gpt-3.5-turbo', { apiKey } as any),
190191
schema: costParametersSchema,
191192
prompt: query,
192193
systemPrompt: systemPromptText,
193-
});
194+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
195+
} as any);
194196

195197
// Type assertion to handle the result object
196198
const extractedParams = result.object as CostParameters;

dashboard/ai-analytics/src/app/api/search/route.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ export async function POST(req: Request) {
4040
Return only valid values from the provided dimensions.`;
4141

4242
const result = await generateObject({
43-
model: openai('gpt-3.5-turbo', { apiKey }),
43+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
44+
model: openai('gpt-3.5-turbo', { apiKey } as any),
4445
schema: filterSchema,
4546
prompt,
4647
systemPrompt: systemPromptText,
47-
});
48+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
49+
} as any);
4850

4951
return Response.json(result.object);
5052
} catch (error) {

0 commit comments

Comments
 (0)