Skip to content

Commit

Permalink
fix(server): Reset AI-generated description if present
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 25, 2024
1 parent 4996224 commit 1e7e7da
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,11 @@ app.get("/api/properties/:id", async (c: Context) => {

const propertyData = property.rows[0] as any;

if (propertyData.ai_generated_description) {
// Reset the ai_generated_description to null if it exists
propertyData.ai_generated_description = null;
}

if (query.regenerate_ai_description === "true") {
const aiDescription = await openaiAssistant(JSON.stringify(propertyData));

Expand Down

0 comments on commit 1e7e7da

Please sign in to comment.