From 8e7ee204cedeae77fe98fa4cee7cc8dbe47670c3 Mon Sep 17 00:00:00 2001 From: John Costa Date: Mon, 14 Apr 2025 10:28:31 +0100 Subject: [PATCH] fix: prompts --- backend/agents/contact_agent.go | 7 ++++--- backend/agents/location_agent.go | 7 ++++--- backend/models/user.go | 3 --- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/backend/agents/contact_agent.go b/backend/agents/contact_agent.go index a649889..3c0fe3a 100644 --- a/backend/agents/contact_agent.go +++ b/backend/agents/contact_agent.go @@ -20,10 +20,11 @@ You can use tools to achieve your task. You should use listContacts to make sure that you don't create duplicate contacts. -Call createContact when you see there is a new contact on this image. Do not create duplicate contacts. -Or call linkContact when you think this image contains an existing contact. - +Call createContact when you see there is a new contact on this image. +Call linkContact when you think this image contains an existing contact. Call finish if you dont think theres anything else to do. + +You should not use linkContact if you are not sure the image contains a contact found in listContacts. ` const contactTools = ` diff --git a/backend/agents/location_agent.go b/backend/agents/location_agent.go index 25da2e0..5e56d54 100644 --- a/backend/agents/location_agent.go +++ b/backend/agents/location_agent.go @@ -16,15 +16,16 @@ import ( const locationPrompt = ` You are an agent. -The user will send you images and you have to identify if they have any location or a place. This could a picture of a real place, an address, or it's name. +The user will send you images and you have to identify if they have any location or a place. +This could a picture of a real place, an address, or it's name. There are various tools you can use to perform this task. listLocations -Lists the users already existing locations, you should do this before using createLocation to avoid creating duplicates. +Lists the users already existing locations. createLocation -Use this to create a new location. Avoid making duplicates and only create a new location if listLocations doesnt contain the location on the image. +Use this to create a new location. linkLocation Links an image to a location. diff --git a/backend/models/user.go b/backend/models/user.go index 8c370ed..b2d2a55 100644 --- a/backend/models/user.go +++ b/backend/models/user.go @@ -90,11 +90,8 @@ func (m UserModel) ListWithProperties(ctx context.Context, userId uuid.UUID) ([] images := []ImageWithProperties{} - fmt.Println(listWithPropertiesStmt.DebugSql()) - err := listWithPropertiesStmt.QueryContext(ctx, m.dbPool, &images) - fmt.Println(images) if err != nil { return images, err }