You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
74 lines
2.1 KiB
C
74 lines
2.1 KiB
C
#pragma once
|
|
|
|
#include "HandmadeMath.h"
|
|
|
|
// @TODO allow AI to prefix out of character statemetns with [ooc], this is a well khnown thing on role playing forums so gpt would pick up on it.
|
|
const char *global_prompt = "You are a character in a simple western video game. You act in the world by responding to the user with json payloads that have fields named \"speech\", \"action\", \"action_argument\" (some actions take an argument), and \"target\" (who you're speaking to, or who your action is targeting).";
|
|
|
|
const char *top_of_header = ""
|
|
"#pragma once\n"
|
|
"\n";
|
|
|
|
typedef struct
|
|
{
|
|
char *name; // the same as enum name
|
|
char *description;
|
|
char *argument_description;
|
|
bool takes_argument;
|
|
} ActionInfo;
|
|
ActionInfo actions[] = {
|
|
#define NO_ARGUMENT .argument_description = "Takes no argument", .takes_argument = false
|
|
{
|
|
.name = "none",
|
|
.description = "Do nothing",
|
|
NO_ARGUMENT,
|
|
},
|
|
{
|
|
.name = "join",
|
|
.description = "Joins somebody else's party, so you follow them everywhere",
|
|
.argument_description = "Expects the argument to be who you're joining",
|
|
},
|
|
{
|
|
.name = "leave",
|
|
.description = "Leave the party you're in right now",
|
|
NO_ARGUMENT,
|
|
},
|
|
};
|
|
|
|
typedef enum
|
|
{
|
|
MSG_SYSTEM,
|
|
MSG_USER,
|
|
MSG_ASSISTANT,
|
|
} MessageType;
|
|
|
|
typedef struct
|
|
{
|
|
char *name;
|
|
char *enum_name;
|
|
char *prompt;
|
|
} CharacterGen;
|
|
CharacterGen characters[] = {
|
|
#define CHARACTER_PROMPT_PREFIX "You specifically are acting as a "
|
|
{
|
|
.name = "nobody",
|
|
.enum_name = "nobody",
|
|
.prompt = "There has been an internal error.",
|
|
},
|
|
{
|
|
.name = "The Player",
|
|
.enum_name = "Player",
|
|
.prompt = "There has been an internal error.",
|
|
},
|
|
{
|
|
.name = "Daniel",
|
|
.enum_name = "Daniel",
|
|
.prompt = CHARACTER_PROMPT_PREFIX "weathered farmer named Daniel, who lives a tough, solitary life. You don't see much of a reason to keep living but soldier on anyways. You have a tragic backstory, and mostly just work on the farm.",
|
|
},
|
|
{
|
|
.name = "Raphael",
|
|
.enum_name = "Raphael",
|
|
.prompt = CHARACTER_PROMPT_PREFIX "physicist from the 1980s who got their doctorate in subatomic particle physics. They don't know why they're in a western town, but they're terrified.",
|
|
},
|
|
};
|