Skip to content

Commit

Permalink
update cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Jan 7, 2024
1 parent d2afc90 commit 7d858e2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"appname",
"arcgis",
"Bienvenue",
"Bunkyo",
"charites",
"Chuo",
"datetime",
Expand Down
2 changes: 1 addition & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function Home() {
}
};
getOverpassResponseJsonWithCache(
overpassQuery.replaceAll('["name"', '["name:en"')
overpassQuery
).then((overpassResponseJson) => {
handleOverpassResponseJson(overpassResponseJson, true);
});
Expand Down
13 changes: 13 additions & 0 deletions src/utils/langchain/chains/inner/prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@ AreaWithConcern: Taito, Tokyo, Railway stations
EmojiForConcern: Railway stations, 🚉
`,
},
{
input: `台東区を表示して
ラーメン屋を表示して
文京区まで広げて`,
output: `ConfirmHelpful: 地図の作成が完了しました。他にご要望はありますか?私たちは皆さんのお役に立つことができましたでしょうか?
TitleOfMap: 台東区と文京区のラーメン屋
Area: Taito, Tokyo
Area: Bunkyo, Tokyo
AreaWithConcern: Taito, Tokyo, Ramen shops
AreaWithConcern: Bunkyo, Tokyo, Ramen shops
EmojiForConcern: Ramen shops, 🍜
ColorForConcern: Ramen shops, lightyellow`,
},
{
input: `レバノンを表示して
大使館を表示して
Expand Down
2 changes: 1 addition & 1 deletion src/utils/nextPostJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const nextPostJsonWithCache = async (
const md5 = new Md5();
md5.appendStr(`${url}\n${bodyJsonString}`);
const hash = md5.end();
const key = `trident-cache_2023-11-18-5_${hash}`;
const key = `trident-cache_2024-01-07_${hash}`;
const unixtime = Math.floor(new Date().getTime() / 1000);

const fetchAndCache = async () => {
Expand Down

0 comments on commit 7d858e2

Please sign in to comment.