jbilcke-hf's picture
jbilcke-hf HF staff
changing the URL again as the public server is being abused by some users
ab75c71
raw
history blame
527 Bytes
import { Game } from "@/app/games/types"
export const getBase = ({
game,
situation = "",
lastEvent = "",
}: {
game: Game;
situation: string;
lastEvent: string;
}) => {
const initialPrompt = [...game.getScenePrompt()].join(", ")
const currentPrompt = situation
? [...game.getScenePrompt(situation)].join(", ")
: initialPrompt
const userSituationPrompt = [
`Player is currently in "${currentPrompt}".`,
lastEvent
].join(" ")
return { initialPrompt, currentPrompt, userSituationPrompt }
}