mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-16 21:37:51 +00:00
feat: Corrigindo analyze-essay
This commit is contained in:
parent
1c6aa56b32
commit
4609217fb7
@ -155,7 +155,52 @@ Responda em formato JSON seguindo exatamente esta estrutura:
|
||||
content: prompt
|
||||
}
|
||||
],
|
||||
response_format: { type: "json_object" }
|
||||
response_format: {
|
||||
type: "json_schema",
|
||||
json_schema: {
|
||||
type: "object",
|
||||
name: "EssayAnalysis",
|
||||
schema: {
|
||||
type: "object",
|
||||
schema: {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
overall_score: { type: "number" },
|
||||
feedback: {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
structure: { type: "string" },
|
||||
content: { type: "string" },
|
||||
language: { type: "string" }
|
||||
}
|
||||
},
|
||||
strengths: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
improvements: {
|
||||
type: "array",
|
||||
items: { type: "string" }
|
||||
},
|
||||
suggestions: { type: "string" },
|
||||
criteria_scores: {
|
||||
type: "object",
|
||||
additionalProperties: false,
|
||||
properties: {
|
||||
adequacy: { type: "number" },
|
||||
coherence: { type: "number" },
|
||||
cohesion: { type: "number" },
|
||||
vocabulary: { type: "number" },
|
||||
grammar: { type: "number" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const analysis: EssayAnalysisResponse = JSON.parse(completion.choices[0].message.content)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user