Spaces:
Sleeping
Sleeping
Download client/modules/systemPrompt.ts from ncee-dp-tech-sme/minisearch: direct link, hf CLI and curl.
- Browser
- Download file 391 Bytes
-
https://huggingface.co/spaces/ncee-dp-tech-sme/minisearch/resolve/main/client/modules/systemPrompt.ts
- Command line
-
hf download hf://spaces/ncee-dp-tech-sme/minisearch/client/modules/systemPrompt.ts
-
curl -L -o systemPrompt.ts https://huggingface.co/spaces/ncee-dp-tech-sme/minisearch/resolve/main/client/modules/systemPrompt.ts
391 Bytes
| import { getSettings } from "./pubSub"; | |
| export function getSystemPrompt(searchResults: string) { | |
| const currentDate = new Intl.DateTimeFormat("en-CA", { | |
| year: "numeric", | |
| month: "2-digit", | |
| day: "2-digit", | |
| }).format(new Date()); | |
| return getSettings() | |
| .systemPrompt.replace("{{searchResults}}", searchResults) | |
| .replace(/{{dateTime}}|{{currentDate}}/g, currentDate); | |
| } | |