Mercurial
diff mrjunejune/inference_bridge.h @ 265:056790c4fb0d
add role-aware Epi assistant prompts
Add verified June knowledge, guest/member/admin Copilot profiles, profile-isolated session recovery, animated Epi greetings, and a single authoritative runtime config workflow for inference.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 07 Aug 2026 10:50:30 -0700 |
| parents | b401627fc49e |
| children |
line wrap: on
line diff
--- a/mrjunejune/inference_bridge.h Fri Aug 07 07:34:12 2026 -0700 +++ b/mrjunejune/inference_bridge.h Fri Aug 07 10:50:30 2026 -0700 @@ -5,6 +5,20 @@ typedef struct Inference_Bridge Inference_Bridge; +#define INFERENCE_BRIDGE_HISTORY_MAX 20 + +/* A single prior-turn entry for transcript rehydration. */ +typedef struct { + const char *role; /* must be "user" or "assistant"; never NULL */ + const char *content; /* non-NULL; may be empty string */ +} Inference_Bridge_History_Message; + +typedef enum { + INFERENCE_PROMPT_PROFILE_PUBLIC_VISITOR = 0, + INFERENCE_PROMPT_PROFILE_INVITED_FRIEND = 1, + INFERENCE_PROMPT_PROFILE_JUNE_ADMIN = 2, +} Inference_Prompt_Profile; + typedef struct { const char *type; const char *request_id; @@ -34,11 +48,25 @@ boolean Inference_Bridge_Start(Inference_Bridge *p_bridge); boolean Inference_Bridge_Is_Ready(const Inference_Bridge *p_bridge); +/* + * Start an inference turn. + * + * p_history / history_count: optional bounded history for transcript + * rehydration. Pass NULL / 0 if no prior context is available. + * history_count must not exceed INFERENCE_BRIDGE_HISTORY_MAX (20). + * Every entry must have role "user" or "assistant" and a non-NULL content. + * Returns FALSE and writes nothing if any validation constraint is violated. + */ boolean Inference_Bridge_Start_Turn( Inference_Bridge *p_bridge, const char *request_id, const char *conversation_id, - const char *prompt); + const char *prompt, + Inference_Prompt_Profile prompt_profile, + uint32 prompt_version, + uint32 knowledge_version, + const Inference_Bridge_History_Message *p_history, + uint32 history_count); boolean Inference_Bridge_Abort_Turn( Inference_Bridge *p_bridge,