Se usan modelos de openai a partir de variables de entorno
This commit is contained in:
@@ -118,6 +118,10 @@ Deno.serve(async (req: Request): Promise<Response> => {
|
||||
SERVICE_ROLE_KEY,
|
||||
);
|
||||
|
||||
// Model name controlled via env var (single use)
|
||||
const AI_GENERATE_PLAN_MODELO = Deno.env.get("AI_GENERATE_PLAN_MODELO") ??
|
||||
"gpt-5-nano";
|
||||
|
||||
const formData = await req.formData();
|
||||
const validation = parseAndValidate(formData);
|
||||
if (!validation.success) {
|
||||
@@ -185,7 +189,7 @@ Deno.serve(async (req: Request): Promise<Response> => {
|
||||
: {};
|
||||
|
||||
const aiStructuredPayload: StructuredResponseOptions = {
|
||||
model: "gpt-5-nano",
|
||||
model: AI_GENERATE_PLAN_MODELO,
|
||||
input: [
|
||||
{ role: "system", content: systemPrompt },
|
||||
{ role: "user", content: userPrompt },
|
||||
|
||||
Reference in New Issue
Block a user