Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shared
3 changes: 2 additions & 1 deletion src/services/openai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const generateEvents = async (
"location": "Finsbury Park Pavilion",
"date": "2025-06-15T19:00:00.000Z",
"price": 15,
"distance": 10,
"url": "https://example.com/jazz-night"
},
...
Expand All @@ -43,7 +44,7 @@ export const generateEvents = async (

const systemPrompt: string =
`You are a local guide who is an expert on ${location} and all the interesting events in that area. You will respond
with the specified events near this location in the valid format.`;
with the specified events near this location in the valid format with the distance to the event provided in kilometers.`;

try {
const formatParser = zodTextFormat(
Expand Down
5 changes: 5 additions & 0 deletions testing/dummyData/event.samples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const testEvents: Event[] = [
location: 'Finsbury Park',
date: '2025-06-15T19:00:00.000Z',
price: 25,
distance: 10,
url: 'https://example.com/festival',
},
{
Expand All @@ -18,6 +19,7 @@ export const testEvents: Event[] = [
location: 'Finsbury Park',
date: '2025-06-15T19:00:00.000Z',
price: 25,
distance: 10,
url: 'https://example.com/festival',
},
{
Expand All @@ -27,6 +29,7 @@ export const testEvents: Event[] = [
location: 'Finsbury Park',
date: '2025-06-15T19:00:00.000Z',
price: 25,
distance: 10,
url: 'https://example.com/festival',
},
{
Expand All @@ -36,6 +39,7 @@ export const testEvents: Event[] = [
location: 'Finsbury Park',
date: '2025-06-15T19:00:00.000Z',
price: 15,
distance: 10,
url: 'https://example.com/jazz',
},
{
Expand All @@ -45,6 +49,7 @@ export const testEvents: Event[] = [
location: 'Finsbury Park',
date: '2025-07-10T08:00:00.000Z',
price: 30,
distance: 10,
url: 'https://example.com/marathon',
},
];
Loading