Skip to content

Commit

Permalink
prompt adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
irony committed Mar 7, 2024
1 parent eb00148 commit 32b6503
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/prompts/parsePDF.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ I have a text extracted from a PDF file containing a company's annual report and
"totalEmissions": "1553",
"totalUnit": "Million ton CO2e"
}
// Additional years follow the same structure
// Additional years follow the same structure. NEVER REUSE THE EXAMPLES ABOVE.
}
}
4. **Include Total**: Don't forget to include the total CO2 emissions for each year if presented. Never try to calculate any values! For Scope 2 - if both market based (MB) and location based (LB) emissions are presented, include both values and select the most relevant one for the total emissions.
4. **Never calculate total**: Don't forget to include the total CO2 emissions for each year if presented. Never try to calculate any values! For Scope 2 - if both market based (MB) and location based (LB) emissions are presented, include both values and select the most relevant one for the total emissions.
5. **Error Codes**: If not all information is available, use the following error codes to indicate missing data (using HTTP Status codes as inspiration):
Expand Down
6 changes: 4 additions & 2 deletions src/workers/searchVectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const worker = new Worker(
const url = job.data.url

job.log('Searching ' + url)
const channel = await discord.client.channels.fetch(job.data.channelId) as TextChannel
const channel = (await discord.client.channels.fetch(
job.data.channelId
)) as TextChannel
const message = await channel.messages.fetch(job.data.messageId)
await message.edit(`Hämtar ut utsläppsdata...`)

Expand All @@ -40,7 +42,7 @@ const worker = new Worker(
const results = await collection.query({
nResults: 5,
queryTexts: [
'GHG accounting, tCO2e (location-based method), ton CO2e, scope, scope 1, scope 2, scope 3, co2, emissions, emissions, 2021, 2023, 2022, gri protocol, CO2, ghg, greenhouse, gas, climate, change, global, warming, carbon, ',
'GHG accounting, tCO2e (location-based method), ton CO2e, scope, scope 1, scope 2, scope 3, co2, emissions, emissions, 2021, 2023, 2022, gri protocol, CO2, ghg, greenhouse, gas, climate, change, global, warming, carbon, växthusgaser, utsläpp, basår, koldioxidutsläpp, koldioxid, klimatmål, ',
],
})

Expand Down

0 comments on commit 32b6503

Please sign in to comment.